Adjustable bar issue (Solved)

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Posts: 3
Joined: Wed Feb 10, 2016 12:46 pm

Adjustable bar issue (Solved)

#1 Post by Popotan » Wed Feb 10, 2016 1:54 pm

Hello everyone. My last few days I was struggling with the code for my game, and precisely speaking - with the adjustable bars. I was so frustrated because of them, that I began thinking about giving up completely. But a hour ago I finally realised how to create those, and now I can state that documentation's articles about adjustable bars are VERY misleading. You don't need any ui. items and even "adjustable" property. Everything you need is just to use "VariableValue("value", range)"

Code: Select all

    $ hours_sleeping = 0
label start:
    call screen going_to_bed

screen going_to_bed
    frame xalign 0.5 yalign 0.5:
            bar xmaximum 300:
                value Variable("hours_sleeping", 24)
                style style.slider
            text "You are going to sleep for [hours_sleeping] hours"
    frame xalign 0.5 yalign 0.9:
            textbutton "Accept" action Jump("next_day")

label next_day:
    "You woke up"
I could leave it as it is, but don't want any other newbie like me to suffer the same I as I was :lol: .

Post Reply

Who is online

Users browsing this forum: No registered users