Page 1 of 1
Scrollable displayable?
Posted: Tue Feb 13, 2018 5:37 pm
by newbiemate
If I have a bunch of displayables (an image and its text) that are vertically stacked under one another, the displayables will eventually go off-screen. Does renpy have some way of wrapping these in a container to make them scrollable?
If not, what's the best way of doing this?
Re: Scrollable displayable?
Posted: Tue Feb 13, 2018 5:45 pm
by Alex
Check this -
https://www.renpy.org/doc/html/screens.html#viewport
And tutorial game that ships with Ren'Py.
Re: Scrollable displayable?
Posted: Tue Feb 13, 2018 6:02 pm
by newbiemate
Ah cool, I'll play around with it. Is there a way to change the default scroll bar to an image I have?
Re: Scrollable displayable?
Posted: Tue Feb 13, 2018 6:38 pm
by Andredron
newbiemate wrote: ↑Tue Feb 13, 2018 6:02 pm
Ah cool, I'll play around with it. Is there a way to change the default scroll bar to an image I have?
Yes you can change. Through the style or change to screen.rpy for all kinds of bar image
Code: Select all
init -5 python:
style.timebar = Style(style.default)
style.timebar.left_bar = Frame("ui/interface/timerfull.png", 0, 0)
style.timebar.right_bar = Frame("ui/interface/timerempty.png", 0, 0)
style.timebar.xmaximum = 695
style.timebar.ymaximum = 27
New gui look for a string
Code: Select all
style bar:
ysize gui.bar_size
left_bar Frame("gui/bar/left.png", gui.bar_borders, tile=gui.bar_tile)
right_bar Frame("gui/bar/right.png", gui.bar_borders, tile=gui.bar_tile)
style vbar:
xsize gui.bar_size
top_bar Frame("gui/bar/top.png", gui.vbar_borders, tile=gui.bar_tile)
bottom_bar Frame("gui/bar/bottom.png", gui.vbar_borders, tile=gui.bar_tile)
style scrollbar:
ysize gui.scrollbar_size
base_bar Frame("gui/scrollbar/horizontal_[prefix_]bar.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
thumb Frame("gui/scrollbar/horizontal_[prefix_]thumb.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
style vscrollbar:
xsize gui.scrollbar_size
base_bar Frame("gui/scrollbar/vertical_[prefix_]bar.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
thumb Frame("gui/scrollbar/vertical_[prefix_]thumb.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
style slider:
ysize gui.slider_size
base_bar Frame("gui/slider/horizontal_[prefix_]bar.png", gui.slider_borders, tile=gui.slider_tile)
thumb "gui/slider/horizontal_[prefix_]thumb.png"
style vslider:
xsize gui.slider_size
base_bar Frame("gui/slider/vertical_[prefix_]bar.png", gui.vslider_borders, tile=gui.slider_tile)
thumb "gui/slider/vertical_[prefix_]thumb.png"
and change images