How to get middle mouse scroll and arrow keys to select textbuttons in a vpgrid?

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
henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

How to get middle mouse scroll and arrow keys to select textbuttons in a vpgrid?

#1 Post by henvu50 »

Imagine your mouse is hovered over a scrollable vpgrid (vertical). Now, when you middle mouse scroll down once, it selects textbutton[0] (inside the vpgrid). When you middle mouse scroll down again, it selects textbutton[1], scroll down again & again, selects textbutton[2] [3] and so forth. Then, once a textbutton is selected via scroll or arrow keys, it instantly invokes whatever action is associated with the textbutton, as soon as it's selected via mouse scroll or arrow keys.

Does this functionality exist by any chance, or is the only way to select a textbutton in a vpgrid is to left click it?

I tried these settings, but didn't work:

Code: Select all

     mousewheel "change"
     arrowkeys True
I was hoping mousewheel change would change the selected textbutton from [0] to [1] to [2], but i don't think that was its purpose.

Basically, using middle mouse scroll or arrow keys with a VPgrid only pans it, doesn't actually select anything in the vpgrid. For now, I can invoke actions over each textbuttons hover action, that's okay, but to select each item in the list with mouse scroll or arrow keys would be great.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], Ocelot