philat wrote: ↑Wed Sep 18, 2019 9:32 pm
Honestly have no idea what you're trying to achieve or what you're seeing based on your posts. Have you changed the styles outside of the say screen? In gui.rpy? Where did you put the code to center the dialogue? etc. etc.
I was trying to get a scrollbar to work with the dialogue textbox for an instance where the game is more novel than it is visual. So, to avoid multiple ongoing page flips, I intended to have a bunch of information on one page, accessed by scrolling. This was to be solved with this bit of code in the screens.rpy code:
Code: Select all
screen say(who, what):
style_prefix "say"
window:
id "window"
has viewport
draggable True
mousewheel True
scrollbars "vertical"
ymaximum style.say_window.yminimum xfill True yfill True
has vbox:
style "say_vbox"
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
text what id "what"
The issue with which I ran into is, the scrollbar works, however it cuts off the last line of text. To try and correct this problem, I cut out this bit of code from above:
While this did correct the problem, scrolling down now showed all of the last line, it also pushed the text to the very left of the page. Using positional code did move the text to the center but it also moved the scrollbar and pushed it off the screen. So, I added in this line of code below 'has viewport':
This re-centered the text without moving the scrollbar off the screen. However, this itself created a new issue. So, on a page with one line of dialogue, you'd expect to be unable to scroll. On a page with a little bit more dialogue than fits the screen, you'd expect to be able to scroll a little. However, what this line does is whatever the maximum scrolling range is for ren'py is given no matter how much text there is. So I could have one line and still be able to scroll to the bottom.
While I would appreciate an actual solution, I have moved past the issue. I've gone back to the original code and have just started adding four new lines to the end of the text, so the last line with actual characters in it is unaffected.