Ren'Py How would you set a viewport edgescroll to vertical or horizontal only?

Ying Ko

Member
Jun 16, 2018
419
766
The vertical edgescroll works how how I would like it, but when approaching the horizontal edge my buttons within the viewport move.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,957
16,191
Isn't it the goal of viewports, to move what is within them ?
 

Ying Ko

Member
Jun 16, 2018
419
766
Isn't it the goal of viewports, to move what is within them ?
I wanted to offer an optional alternative to using the scroll wheel when navigating a recurring interactable list. Vertical edgesrcoll is a fluid alternative, however, horizontal edgescroll has the list bouncing to and fro in a distracting manner.
 
Last edited:

crabsinthekitchen

Well-Known Member
Apr 28, 2020
1,565
9,063
I wanted to offer an optional alternative to using the scroll wheel when navigating a recurring interactable list. Vertical edgesrcoll is a fluid alternative, however, horizontal edgescroll has the list bouncing to and fro in a distracting manner.
does it need horizontal scrolling? because if not, then it shouldn't do edgescrolling as long as the viewport and scrollbar width is smaller than the screen

so here I get bouncing
Code:
define gui.scrollbar_size = 18

screen my_screen():
    add "background.png" xsize 1920 ysize 1080
    viewport:
        scrollbars "vertical"
        edgescroll (150, 600)
        mousewheel True
        arrowkeys True
        pagekeys True
        vbox:
            xsize 1920
            ysize 2500
            ...
but if I reduce the size of vbox to fit the scrollbar I don't get any bouncing (RenPy 7.5.3)
Code:
define gui.scrollbar_size = 18

screen my_screen():
    add "background.png" xsize 1920 ysize 1080
    viewport:
        scrollbars "vertical"
        edgescroll (150, 600)
        mousewheel True
        arrowkeys True
        pagekeys True
        vbox:
            xsize 1900 #no bouncing
            ysize 2500
            ...
 
  • Like
Reactions: Ying Ko

Ying Ko

Member
Jun 16, 2018
419
766
does it need horizontal scrolling? because if not, then it shouldn't do edgescrolling as long as the viewport and scrollbar width is smaller than the screen

so here I get bouncing
Code:
define gui.scrollbar_size = 18

screen my_screen():
    add "background.png" xsize 1920 ysize 1080
    viewport:
        scrollbars "vertical"
        edgescroll (150, 600)
        mousewheel True
        arrowkeys True
        pagekeys True
        vbox:
            xsize 1920
            ysize 2500
            ...
but if I reduce the size of vbox to fit the scrollbar I don't get any bouncing (RenPy 7.5.3)
Code:
define gui.scrollbar_size = 18

screen my_screen():
    add "background.png" xsize 1920 ysize 1080
    viewport:
        scrollbars "vertical"
        edgescroll (150, 600)
        mousewheel True
        arrowkeys True
        pagekeys True
        vbox:
            xsize 1900 #no bouncing
            ysize 2500
            ...
I gave it a try, my buttons still bounce horizontally, I'd rather have no edgescroll than the results I'm getting. Thanks anyway.