[SOLVED] Vpgrid scrollbar customization?

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
filthsama
Newbie
Posts: 18
Joined: Tue Jan 05, 2021 4:11 am
Completed: 0
Projects: A dating sim with some Persona mechanics
Contact:

[SOLVED] Vpgrid scrollbar customization?

#1 Post by filthsama »

Currently implementing an inventory system that requires a vpgrid rather than a regular viewport. I was wondering if it was possible at all to customize the scrollbars of a vpgrid because every method I've looked up seems to only work for a viewport.
Last edited by filthsama on Wed Jun 29, 2022 1:52 am, edited 1 time in total.

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

Re: Vpgrid scrollbar customization?

#2 Post by Ocelot »

vpgrid is still a viewport with some grid properties attacjed. You still can access scrollbars and side_ properties, just as you can for viewport, for example.
< < insert Rick Cook quote here > >

User avatar
filthsama
Newbie
Posts: 18
Joined: Tue Jan 05, 2021 4:11 am
Completed: 0
Projects: A dating sim with some Persona mechanics
Contact:

Re: Vpgrid scrollbar customization?

#3 Post by filthsama »

Ocelot wrote: Fri Jun 24, 2022 3:03 am vpgrid is still a viewport with some grid properties attacjed. You still can access scrollbars and side_ properties, just as you can for viewport, for example.
I'm unsure how to change the scrollbars from there. For this specific vpgrid, I want a custom scrollbar that has a different thumb and bar, but I'm unsure where I'd define those.

User avatar
zmook
Veteran
Posts: 421
Joined: Wed Aug 26, 2020 6:44 pm
Contact:

Re: Vpgrid scrollbar customization?

#4 Post by zmook »

A vpgrid *is* a viewport, so you do it exactly how the instructions say to do it for a viewport, except instead of

Code: Select all

        viewport id "vp":
             mousewheel True
             …etc
you have

Code: Select all

        vpgrid id "vp":
             mousewheel True
             …etc
colin r
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM

Post Reply

Who is online

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