For example...
I have 5 rows of items in a viewport.
XXXXXX
XXXXXX
-------------- Screen ends here
XXXXXX
XXXXXX
XXXXXX
There is a scrollbar where you can use a mouse to manually click and scroll.
You can also use mousewheel to scroll down the viewport.
HOWEVER, if you are using controller, and you press DOWN the selection only goes up to Row 2 and then stops, even if there are three more rows.
XXXXXX
[X]XXXXX <--- Selection stops here even if I press DOWN, the viewport won't automatically scroll to display the next row.
-------------- Screen ends here
XXXXXX
XXXXXX
XXXXXX
How can I make this possible? I want the game to auto-scroll the viewport and display the next row.
It should only scroll to display the next row, not more than this, just enough to show the next row of entries.
I feel like this should be normal functionality for Ren'Py but it seems the quality of controller support is lacking, so I will need to code this myself.
Any help is appreciated, thanks.
Solved
I worked around this using ui.adjustment and the screen function to change the value when the button is pressed:
Code: Select all
key CONTROLLER_BUTTON action Function(yadj.change, yadj.value - VAL_TO_MOVE), renpy.restart_interaction