Scrollable displayable?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
newbiemate
Regular
Posts: 85
Joined: Tue Dec 19, 2017 1:36 pm
Contact:

Scrollable displayable?

#1 Post 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?

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Scrollable displayable?

#2 Post by Alex »

Check this - https://www.renpy.org/doc/html/screens.html#viewport
And tutorial game that ships with Ren'Py.

newbiemate
Regular
Posts: 85
Joined: Tue Dec 19, 2017 1:36 pm
Contact:

Re: Scrollable displayable?

#3 Post 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?

User avatar
Andredron
Miko-Class Veteran
Posts: 700
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: Scrollable displayable?

#4 Post 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

Post Reply

Who is online

Users browsing this forum: No registered users