Hey! I'm new to Ren'Py and I've been doing fine so far looking at the documentation and tutorials, but I got stuck on this.
Is there any way to create a scrollbar and use it to scroll imagebuttons? I'm guessing it would be something like:
- Create scrollbar
- Create a variable and set it according to the position of the thumb on the bar
- Set pos of the imagebuttons according to previously mentioned variable
...but I'm not even sure on how to create a scrollbar. I messed around with viewports and Python a bit, but I didn't really get very far. Here's a few mockup images in case you don't undestand what I want to do. Thanks in advance!
Using a scrollbar to scroll imagebuttons [SOLVED]
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Using a scrollbar to scroll imagebuttons [SOLVED]
- Attachments
-
- example3 (1).png (2.17 KiB) Viewed 635 times
-
- example2 (1).png (2 KiB) Viewed 635 times
-
- example1 (1).png (2.29 KiB) Viewed 635 times
Last edited by AlceX on Sat Feb 28, 2015 6:32 pm, edited 1 time in total.
Re: Using a scrollbar to scroll imagebuttons
What you want is viewport. Example of code: http://lemmasoft.renai.us/forums/viewto ... 43#p328769
Re: Using a scrollbar to scroll imagebuttons
Thanks for pointing me in the right direction! I had a feeling it had something to do with viewports...
For anyone who finds this later, here's the code I ended up using in the end:
For anyone who finds this later, here's the code I ended up using in the end:
Code: Select all
screen test:
window id "window":
has viewport
draggable True
scrollbars "horizontal"
ymaximum 100
side_ypos -300
hbox:
spacing 200
imagebutton auto "gui/pracexp/pracexp_morning_%s.png" focus_mask True action Jump("morning")
imagebutton auto "gui/pracexp/pracexp_afternoon_%s.png" focus_mask True action Jump("afternoon")
imagebutton auto "gui/pracexp/pracexp_evening_%s.png" focus_mask True action Jump("evening")
- Attachments
-
- result.png (4.26 KiB) Viewed 613 times
Who is online
Users browsing this forum: Google [Bot]