What to do with the default X padding for all frames?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
span4ev
Regular
Posts: 77
Joined: Fri Jul 08, 2022 9:29 pm
itch: rpymc
Contact:

What to do with the default X padding for all frames?

#1 Post by span4ev » Sun Jul 17, 2022 12:26 am

Hello. I noticed that for some frames for which style_prefix is ​​defined, X padding, Y padding and xfill and yfill are set.

Code: Select all

style _frame:
xfill True
xpadding 150
yfill True
ypadding 15
Hello. When, after some time, I couldn’t get the result I needed and saw that something strange was clearly happening here, I opened the object manager via shift + i and then noticed that for some frames (for which style_prefix is ​​​​defined) X and Y padding, and X and Y fill set .

1. This is inconvenient because it is confusing when calculating the location of objects. And you can not immediately find out that this is not affected by incorrect function calculations, but by default X padding.

2. I did not find these styles in the game config. Perhaps they are somewhere in the Renpy folder, and not in the game folder.

3. It is inconvenient to prescribe for frames every time. Those are extra lines of code...

Code: Select all

style 'some_prefix':
xfill False
xpadding 0
yfill False
ypadding 0
4. For some reason I don't understand, this X padding doesn't always work. This only happened twice. In other cases, this was not the case. That is, this incident is not permanent, but it rarely happens.

5. If I override the style for the default frames and set the values ​​to 0, in what place can this negatively affect the position of other objects later?
After all, this applies to all frames, and if the developers did just that, then somewhere it is really needed. By changing the value to 0, somewhere in the future this might break something. Maybe.


What is the solution to this problem? I created another question, but I'm afraid that it has lost relevance, and the name of the last question does not reflect the meaning of what I want now. I'm sorry for the duplicate question, but the previous question is now out of context.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot]