Make horizontal bar with left & right arrow buttons that scroll a hbox? (picture)
Posted: Sat Sep 08, 2018 5:35 pm
I made a picture of what I'm trying to achieve:

There's an hbox with name labels in it. Then you click the left and right arrows, it cycles through the names while showing data of each name in the center.
Does anyone know an example somewhere out there already made that I can learn from?
Here is my code so far:

There's an hbox with name labels in it. Then you click the left and right arrows, it cycles through the names while showing data of each name in the center.
Does anyone know an example somewhere out there already made that I can learn from?
Here is my code so far:
Code: Select all
screen test_screen:
frame:
background Solid("#00000090")
align (0.5, 0.2)
frame:
background Solid("#00000090")
hbox:
#LEFT ARROW BUTTON
imagebutton:
idle "images/gui/arrowleftbtn.png"
# NAMES
label "name1"
label "name2"
label "name3"
#RIGHT ARROW BUTTON
imagebutton:
idle "images/gui/arrowrighttbtn.png"
vbox:
# based upon name show the following data
text "data for nameX"