Texts too big for textbox and "viewport"? Scrolldown?

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
User avatar
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Texts too big for textbox and "viewport"? Scrolldown?

#1 Post by Nanahs »

This is something I've been trying to figure out.
I took a look at this:
https://www.renpy.org/doc/html/screens. ... r#viewport

If I want to always have a scrollbar in the text boxes when the texts are too big for the screen, can I define it only once in "options" so that it would be "default"?
I've only seen examples of that in a "screen", so I got confused.

Thanks :)
Last edited by Nanahs on Fri Oct 26, 2018 10:14 am, edited 2 times in total.

User avatar
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Re: Texts too big for screen and "viewport"?

#2 Post by Nanahs »

I found this code, but this is for the old Renpy version:

Code: Select all

            id "window"
            has viewport
            draggable True
            mousewheel True
            scrollbars "vertical"
            ymaximum style.say_window.yminimum xfill True yfill True
            has vbox:
                style "say_vbox"

            if who:
                text who id "who"

            text what id "what"
I wanted to know if there's a new code that can do it.

I tried something like this:

Code: Select all

screen messages():
    
    side "c b r":
         area (100, 100, 600, 400)

         viewport id "vp":
             draggable True

         bar value XScrollValue("vp") unscrollable "hide"
         vbar value YScrollValue("vp") unscrollable "hide"  
But it didn't work. First the bar wouldn't disappear from the screen. Then I added "hide". And now it never appears hah

Post Reply

Who is online

Users browsing this forum: No registered users