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.
-
mjshi
- Regular
- Posts: 179
- Joined: Wed Mar 13, 2013 9:55 pm
- Completed: MazeSite01, Ponderings of Time
-
Contact:
#1
Post
by mjshi » Mon Dec 22, 2014 12:37 pm
Aah, it's been so long I forgot the contents of my own tutorial
Very simple question, I read up on ui.adjustment again, didn't quite understand it, realized that I deleted my working demo of an adjustable bar a few months ago, and came crawling back to the forums xD
How does one create a player-adjustable bar in the new-ish screen language?
Example please, should be fairly simple but I don't know how to define it within a screen:
Code: Select all
screen thebar:
bar value VariableValue("barvariable", 100):
xalign 0.0 yalign 0.0
xmaximum 400
ymaximum 15
left_bar Frame("bar_full.png", 10, 0)
right_bar Frame("bar_full.png", 10, 0)
thumb "thumb.png"
left_gutter 100
right_gutter 100
thumb_shadow None
adjustment ()
Last edited by
mjshi on Mon Dec 22, 2014 1:12 pm, edited 1 time in total.
-
xela
- Lemma-Class Veteran
- Posts: 2481
- Joined: Sun Sep 18, 2011 10:13 am
-
Contact:
#2
Post
by xela » Mon Dec 22, 2014 12:57 pm
Code: Select all
bar value VariableValue("barvariable", 100)
This is enough to create a full screen-size, user adjustable bar that will work perfectly. There is no need for any functions like adjustment() or ui.adjustment() in screen language.
Like what we're doing? Support us at:

-
mjshi
- Regular
- Posts: 179
- Joined: Wed Mar 13, 2013 9:55 pm
- Completed: MazeSite01, Ponderings of Time
-
Contact:
#3
Post
by mjshi » Mon Dec 22, 2014 1:06 pm
Ah xD Stupid question, I realized where the error was. The left_gutter and right_gutter values were too large and wouldn't allow the 400x15 slider to do any, well, sliding
Thank you for the help ^_^
Users browsing this forum: No registered users