Page 1 of 1

Controller Bug Regarding Viewport Wheeling

Posted: Tue Aug 03, 2021 1:05 pm
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.

Re: Controller Bug Regarding Viewport Wheeling

Posted: Tue Aug 03, 2021 10:24 pm
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.