Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: angle of rotation
Post: RE: angle of rotation
Thanks, I will definitely try your code! |
|
berckut72 |
Game Development |
4 |
3,006 |
Apr-27-2020, 04:55 PM |
|
|
Thread: angle of rotation
Post: RE: angle of rotation
I entered into the program correction bot coefficients from the current bot direction. Now shows the exact value of the angle.
import tkinter as tk
from tkinter import*
import math
root = tk.Tk()
r... |
|
berckut72 |
Game Development |
4 |
3,006 |
Apr-16-2020, 04:56 AM |
|
|
Thread: angle of rotation
Post: angle of rotation
Hello everyone!
Tell me, please - how can I determine the angle between the bot and the click? I wrote this in the program, but if the click is on the left and higher relative to the bot, the angle is... |
|
berckut72 |
Game Development |
4 |
3,006 |
Apr-15-2020, 10:22 AM |
|
|
Thread: new font
Post: RE: new font
Thank you, I already figured out the fonts in the system. |
|
berckut72 |
GUI |
2 |
57,008 |
Mar-31-2020, 06:18 PM |
|
|
Thread: new font
Post: new font
Hello!
Please tell me - how can I install in python a new font downloaded from the Internet? |
|
berckut72 |
GUI |
2 |
57,008 |
Mar-30-2020, 11:45 AM |
|
|
Thread: the picture disappears
Post: RE: the picture disappears
I solved the problem))) Creating a list of pictures transferred from the function (line 20) to the main code (on line 17) and it worked. |
|
berckut72 |
GUI |
1 |
3,501 |
Mar-24-2020, 08:37 PM |
|
|
Thread: the picture disappears
Post: the picture disappears
Hello!
Tell me, please ... I move the picture in the class using a separate method, and when the picture receives the last coordinate, then it disappears, and I need the picture to not disappear.
...... |
|
berckut72 |
GUI |
1 |
3,501 |
Mar-24-2020, 07:07 PM |
|
|
Thread: Grid data entry problem
Post: RE: Grid data entry problem
Maybe I'm wrong, but where do you have data entry in Entry? Or is not your whole program here? |
|
berckut72 |
GUI |
3 |
2,287 |
Mar-17-2020, 02:18 PM |
|
|
Thread: how the class works
Post: RE: how the class works
Theoretically - I understand the paradigm of classes - inheritance, encapsulation, preparation for an instance, properties and methods of a class ... Probably, I just do not have enough practice to kn... |
|
berckut72 |
General Coding Help |
10 |
5,101 |
Mar-17-2020, 10:03 AM |
|
|
Thread: how the class works
Post: RE: how the class works
I didn’t know that either)))
To solve my problem, I saw a code example of how this problem can be solved and applied this code without really understanding it. The main thing is that it works! However... |
|
berckut72 |
General Coding Help |
10 |
5,101 |
Mar-17-2020, 09:54 AM |
|
|
Thread: import*
Post: RE: import*
Thank you, your link is very useful information. Even if something is out of date, then most are still very useful! |
|
berckut72 |
GUI |
2 |
1,520 |
Mar-17-2020, 09:44 AM |
|
|
Thread: import*
Post: import*
Hello!
An expression (from tkinter import *) is often used. In order not to use an asterisk, you need to know what specifically to import. How to find out what your program uses from tkinter so that i... |
|
berckut72 |
GUI |
2 |
1,520 |
Mar-17-2020, 07:14 AM |
|
|
Thread: how the class works
Post: RE: how the class works
This code works well:
import tkinter as tk
from tkinter import*
from PIL import Image, ImageTk
root = tk.Tk()
fon1 = Image.open('C:\\ws5_class\\general\\g06.PNG').convert('RGBA')
fon_im1 = Image... |
|
berckut72 |
General Coding Help |
10 |
5,101 |
Mar-17-2020, 05:04 AM |
|
|
Thread: how the class works
Post: RE: how the class works
I wanted to find out that when defining a class, the method does not execute, unlike a property. Thanks!
In your example, everything is very well explained, but for me it was news)))
If you may, the... |
|
berckut72 |
General Coding Help |
10 |
5,101 |
Mar-16-2020, 06:57 PM |
|
|
Thread: how the class works
Post: RE: how the class works
If I understand correctly, then all classes are executed once during the definition, and then they must be called explicitly? So that the code inside the class does not execute when defining the class... |
|
berckut72 |
General Coding Help |
10 |
5,101 |
Mar-16-2020, 06:48 PM |
|
|
Thread: how the class works
Post: how the class works
Hello!
I wrote a very small program and created a class in it for loading pictures without defining methods. I was surprised to find that the part of the code that is in the class is executed without ... |
|
berckut72 |
General Coding Help |
10 |
5,101 |
Mar-16-2020, 06:38 PM |
|
|
Thread: procedural in class
Post: RE: procedural in class
My biggest problem is how to convert a GUI to classes. Here I don’t even know how to start solving this problem?
Make parent class the very first canvas? Or is the class a control button? Or is the ... |
|
berckut72 |
GUI |
4 |
2,035 |
Mar-14-2020, 02:12 AM |
|
|
Thread: procedural in class
Post: RE: procedural in class
A player is a dictionary-type data structure, very convenient.
The problem in the graphical interface is what to make the main class here ... Or to do it without the main class, and in all classes t... |
|
berckut72 |
GUI |
4 |
2,035 |
Mar-13-2020, 05:32 PM |
|
|
Thread: procedural in class
Post: procedural in class
Hello!
Made a game in the genre of rts, space. Ready for 80%. Wrote over 12,000 lines of code. Unfortunately, I did everything with a procedural language, without using classes. Used pure python + PI... |
|
berckut72 |
GUI |
4 |
2,035 |
Mar-13-2020, 04:46 PM |
|
|
Thread: pickle image
Post: RE: pickle image
def create_map(gamers):
fon_003 = gamers['planet']['image']
fon_003.putalpha(100)
fon003_im = ImageTk.PhotoImage(fon_003)
im_001 = canvas1.create_image(gamers['planet']['coord'], ... |
|
berckut72 |
GUI |
1 |
3,673 |
Mar-03-2020, 02:47 PM |