Controller Bug Regarding Viewport Wheeling

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
SypherZent
Veteran
Posts: 362
Joined: Fri Sep 02, 2016 3:14 am
Completed: Multiverse Heroes, Space Hamster in Turmoil
Location: Puerto Rico
Contact:

Controller Bug Regarding Viewport Wheeling

#1 Post by SypherZent »

Code: Select all

    config.pad_bindings['repeat_pad_righty_neg'].append('viewport_wheelup')
    config.pad_bindings['repeat_pad_righty_pos'].append('viewport_wheeldown')
    config.pad_bindings['repeat_pad_righty_neg'].append('viewport_up')
    config.pad_bindings['repeat_pad_righty_pos'].append('viewport_down')
    config.pad_bindings['pad_righty_neg'].append('viewport_wheelup')
    config.pad_bindings['pad_righty_pos'].append('viewport_wheeldown')
    config.pad_bindings['pad_righty_neg'].append('viewport_up')
    config.pad_bindings['pad_righty_pos'].append('viewport_down')
When setting the controller's right stick to handle the viewport up/down functionality, it doesn't work.

The viewport in question has a scrollbar and the scrollbar initializes to float('inf') (i.e. bottom of the viewport). It is the History screen, with that only change (yadj = ui.adjustment() and then setting the adjustment value to float('inf') so the screen always opens scrolled to the bottom).

Note that the mousewheel works fine and in all cases.
The controller set to the same viewport_wheelup/down functionality does not work like the mouse wheel.

This is a similar case to setting the 'skip' functionality to righttrigger_pos. It doesn't act like the keyboard CTRL button where release stops skipping.
For some reason, the controller functions cannot simply be set to the keyboard functions from the keymap documentation with the same functionality as expected.
This should be fixed for ease of usage and ease of mapping the controller.
I should just be able to use the code above to make the right stick work like the mousewheel, without any extra hassle and without bugs.

Hope this can be fixed in an upcoming release. Thanks in advance for the consideration.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Controller Bug Regarding Viewport Wheeling

#2 Post by PyTom »

I've checked, and this works provided you clear the list in advance. If you don't, then focus_up/focus_down take priority.

The intended way to do this task is to activate the bar, move it up and down, and then deactivate the bar and switch over to whatever it is inside the viewport.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users