How to adjust scrollbar size?

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
User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3795
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

How to adjust scrollbar size?

#1 Post by Imperf3kt »

I'd like to make my scrollbars larger, but I don't seem to be able to.
I assumed I adjusted this number in gui.rpy

Code: Select all

define gui.scrollbar_size = 24
But it doesn't change anything even if I set the number ridiculously high.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Alex
Lemma-Class Veteran
Posts: 3095
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: How to adjust scrollbar size?

#2 Post by Alex »

Any chance you've applied custom style to scrollbar(s), 'cause changing gui.scrollbar_size worked for me (scrollbars in preferences menu and in game)?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3795
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How to adjust scrollbar size?

#3 Post by Imperf3kt »

Possibly. Although I did check my entire project for every instance of "scrollbar" and the only place I defined it was the default line in gui.rpy

Ill try on a new blank project and see if the issue persists.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2411
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: How to adjust scrollbar size?

#4 Post by Ocelot »

If it does not, check scrollbars in your project with style inspector to see, where they get their style properties from.
< < insert Rick Cook quote here > >

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3795
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How to adjust scrollbar size?

#5 Post by Imperf3kt »

I've checked everything I possibly can, nothing should be causing this.
According to the style inspector, it is just following the style "scrollbar"
Image
which is defined as "gui.scrollbar", same as all my other projects.
Image
Image

Yet the ysize refuses to change from 25


Adjusting the size in other projects works as expected (although it doesn't adjust the size of the thumb) and I've checked the files for differences but cannot find any.


After messing around with everything I could think of I added my own custom style:

Code: Select all

style role_screen_scrollbar:
    ysize 60
    base_bar Frame("gui/scrollbar/horizontal_[prefix_]bar.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
    thumb Frame("gui/scrollbar/horizontal_[prefix_]thumb.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
If I use gui.scrollbar_size it doesn't work, but using an integer works just fine.

This works well enough, but I'd still like to find out why gui.scrollbar_size refuses to work.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2411
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: How to adjust scrollbar size?

#6 Post by Ocelot »

Check in console what is the value of gui.scrollbar_size actually is.
If it is 25, then something must have overwritten original assignment.
If it is 60, as expected, rebuild styles in game.
If it fixes scrollbar size, the you have weird problem with order of initialization.
If it didn't, then something even more weird happened.
< < insert Rick Cook quote here > >

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3795
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How to adjust scrollbar size?

#7 Post by Imperf3kt »

Ocelot wrote: Mon Oct 25, 2021 5:57 am If it fixes scrollbar size, the you have weird problem with order of initialization.
I'm actually thinking its this, but tracking it down is difficult.

Unfortunately, rebuilding styles is not a viable option. I'll make a backup and test, but I likely cannot use that option due to heavy customization.
The console reports it as 25 though, so I don't think its a style issue. Though, there's literally nothing overwriting it as far as I can tell, I've checked the entire game several times over.


Thanks for the help so far. If I find out what is happening, I'll post the solution here.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2411
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: How to adjust scrollbar size?

#8 Post by Ocelot »

You probably did this already, but: did you rename any rpy files recently or at tall? Did you try deleting all rpyc files to make sure there isn't any old data remaining? I had problem once when no changes to certain rpy file were registered. Turns out, corresponding rpyc file creation date was set in the future, and game thought that it is newer than recently changed rpy file.
< < insert Rick Cook quote here > >

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3795
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How to adjust scrollbar size?

#9 Post by Imperf3kt »

I haven't renamed any rpy files but I have made some which I use for setting variables and additional screens, though not recently.

I have tried forcing recompile, which is the same as deleting the rpyc files and regenerating them, right?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Alex
Lemma-Class Veteran
Posts: 3095
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: How to adjust scrollbar size?

#10 Post by Alex »

Imperf3kt wrote: Mon Oct 25, 2021 3:32 pm I haven't renamed any rpy files but I have made some which I use for setting variables and additional screens, though not recently.
Also, check the names of your files - files are processing in alphabetical order (once I named file starting with underscore and got some issues), and the priority of different init blocks.

Post Reply

Who is online

Users browsing this forum: No registered users