I have noticed that the text in my textbox seems to shift up/down one pixel depending on whether a panel of dialogue is 1 or 2 lines. It's not a major issue, but is a little annoying.
I am using a custom textbox for the say window, by the way. Is there some text specific variable that can fix this? Here is my relevant code.
style.window.background = "ui/window.png"
## Margin is space surrounding the window, where the background
## is not drawn.
style.window.left_margin = 260
style.window.right_margin = 260
## Padding is space inside the window, where the background is
## drawn.
style.window.left_padding = 80
style.window.right_padding = 100
style.window.top_padding = 75
style.window.bottom_padding = 20
## This is the minimum height of the window, including the margins
## and padding.
style.window.yminimum = 256
Text misaligning in say box when there is 1 or 2 lines
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.
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.
Re: Text misaligning in say box when there is 1 or 2 lines
Looking through the renpy stuff, it seems there is some property for padding between lines of text, which seems to be the only thing that could be causing this.
What I believe is happening right now:
- There is some property for text that 'pads' above a line
- The pad for line 1 is either 0 or some set value
- When the dialogue creates line 2, it either adds to the line 1 value or sets it something other than 0
What I believe is happening right now:
- There is some property for text that 'pads' above a line
- The pad for line 1 is either 0 or some set value
- When the dialogue creates line 2, it either adds to the line 1 value or sets it something other than 0
Re: Text misaligning in say box when there is 1 or 2 lines
Yep, found it: line_leading
style.default.line_leading = 12
The above code fixes the problem, I'm not sure if I'm the only one that was having it. 12 seems to be the default value for the variable, but I'm not sure why it wasn't 'sticking' until I set it myself. I'll leave this thread open in case anyone else runs into this.
style.default.line_leading = 12
The above code fixes the problem, I'm not sure if I'm the only one that was having it. 12 seems to be the default value for the variable, but I'm not sure why it wasn't 'sticking' until I set it myself. I'll leave this thread open in case anyone else runs into this.
Who is online
Users browsing this forum: babayi0827, Majestic-12 [Bot], Semrush [Bot]