Viewport Help
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.
Viewport Help
Can anyone provide a link to a tutorial for viewports, or perhaps just provide a quick explanation on how to customize them. Currently I have something akin to a quest screen with a background and a vbox containing variable amounts of text. All I'm looking to do is make the text section scrollable when needed. I've done some searching, read through some older posts, and done my best to understand how these work, but I'm still at a loss. I can get the viewport to technically function, but as soon as I make any changes to the given examples I start to run into problems. Any help would be appreciated.
Re: Viewport Help
From google search: viewtopic.php?f=8&t=15269&start=15#p269572
Re: Viewport Help
I appreciate the link but sadly it still doesn't quite tell me what I need to know. Maybe it would be better to just ask more specifically for what I need. Here's an image of what I'm trying to achieve:
Re: Viewport Help
Sorry was in a rush to go to bed. Here's the sample code from the official documentation that I used myself:
https://www.renpy.org/doc/html/screens.html#viewport
I've added comments at the end of each line for info
https://www.renpy.org/doc/html/screens.html#viewport
I've added comments at the end of each line for info
Code: Select all
screen viewport_example():
side "c b r": # https://www.renpy.org/doc/html/screens.html#side for more info
area (100, 100, 600, 400) # x, y, width, height (https://www.renpy.org/doc/html/style_properties.html?highlight=area#style-property-area)
viewport id "vp": # the id to be used by the scroll bar
draggable True # allows player to drag this
add "washington.jpg" # replace this with your vbox list of content.
vbar value YScrollValue("vp") # scrollbar, style this with using the bar properties: https://www.renpy.org/doc/html/screens.html#bar, i.e. common, position and bar style properties.
Re: Viewport Help
Thanks you so much for spelling everything out for me. I probably spent three hours trying to figure this out on my own and with the links you provided I was able to get everything working in less than 10 minutes. Can't thank you enough.
Who is online
Users browsing this forum: Google [Bot], Ocelot