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.
Duskylli
Regular
Posts: 175 Joined: Wed Mar 27, 2013 12:48 pm
Completed: The Mishka Effect, Fairly Dangerous.
Projects: Palette Swap
Contact:
#1
Post
by Duskylli » Mon Mar 31, 2014 11:31 pm
I'm trying to style the 'Music Volume', 'Sound Volume,' 'Text speed' and 'Auto Forward Time' bars vertically for the Prefs screen using Leon and Uncle Mugen's image button tutorial. The graphic for the bars and thumb appears fine when I use horizontal bars. But when I try to style it vertically the clock graphic and mouse disappears and the options don't work properly.
Code: Select all
frame xpos 493 ypos 380:
style_group "pref"
has vbox
vbar value Preference("music volume")
frame xpos 647 ypos 380:
style_group "pref"
has vbox
vbar value Preference("sound volume")
frame xpos 806 ypos 380:
style_group "pref"
has vbox
vbar value Preference("text speed")
frame xpos 972 ypos 380:
style_group "pref"
has vbox
vbar value Preference("auto-forward time")
init -2 python:
# Styling for the bar sliders:
# Aleema's Customizing Menus tutorial: http://lemmasoft.renai.us/forums/viewtopic.php?f=51&t=9812
# Bar style properties documentation: http://www.renpy.org/doc/html/style.html#bar-style-properties
style.pref_frame.background = None
style.pref_slider.top_bar = "gui/config_vbar_full.png"
style.pref_slider.bottom_bar = "gui/config_vbar_empty.png"
style.pref_slider.thumb = None
style.pref_slider.xmaximum = 72
style.pref_slider.ymaximum = 263
style.pref_slider.thumb = "gui/thumb.png"
style.pref_slider.thumb_offset = 20
style.pref_slider.thumb_shadow = None
Attachments
The graphic dissapears.
Last edited by
Duskylli on Tue Apr 01, 2014 12:46 am, edited 1 time in total.
feathersnake
Regular
Posts: 104 Joined: Fri Apr 13, 2012 8:05 pm
Completed: A Rose by Any Other Name
Projects: Color, You've Got Mail!
Organization: Olfix Productions
Tumblr: olfix
Deviantart: olfix
Contact:
#2
Post
by feathersnake » Mon Mar 31, 2014 11:50 pm
I remember having issues with that myself. Here's what I had for Rose's sliders after init -2 python:
Code: Select all
style.pref_frame.background = None
style.pref_slider.bar_vertical = True
style.pref_slider.bar_invert = False
style.pref_slider.bottom_bar = "Gui/Rose_Prefs_Thermfull.png"
style.pref_slider.top_bar = "Gui/Rose_Prefs_Thermempty.png"
style.pref_slider.thumb = None
style.pref_slider.xmaximum = 30
style.pref_slider.ymaximum = 148
Naturally, your x and y maximum values are different.
Also, in your code I noticed that you have "style.pref_slider.thumb" defined as None once and then again with an image.
Duskylli
Regular
Posts: 175 Joined: Wed Mar 27, 2013 12:48 pm
Completed: The Mishka Effect, Fairly Dangerous.
Projects: Palette Swap
Contact:
#3
Post
by Duskylli » Tue Apr 01, 2014 12:17 am
Hey feathersnake! Oops the thumbs still work though xD
Ok I added some code but its still not working:
Code: Select all
init -2 python:
style.pref_frame.background = None
style.pref_slider.bar_vertical = True
style.pref_slider.bar_invert =False
style.pref_slider.bottom_bar = "gui/config_vbar_empty.png"
style.pref_slider.top_bar = "gui/config_vbar_full.png"
style.pref_slider.xmaximum = 72
style.pref_slider.ymaximum = 263
style.pref_slider.thumb = "gui/thumb.png"
style.pref_slider.thumb_offset = 20
style.pref_slider.thumb_shadow = None
My x and y maximum are the exact size of the config bar graphic.
feathersnake
Regular
Posts: 104 Joined: Fri Apr 13, 2012 8:05 pm
Completed: A Rose by Any Other Name
Projects: Color, You've Got Mail!
Organization: Olfix Productions
Tumblr: olfix
Deviantart: olfix
Contact:
#4
Post
by feathersnake » Tue Apr 01, 2014 12:28 am
Hello. :3
Ah, I tried imitating a piece of your code that was different than mine to see if I could get a similar issue, and I think I found it. Instead of "vbar" in the values of your first chunk of code, try taking out the "v" so it's just "bar value" for each.
Duskylli
Regular
Posts: 175 Joined: Wed Mar 27, 2013 12:48 pm
Completed: The Mishka Effect, Fairly Dangerous.
Projects: Palette Swap
Contact:
#5
Post
by Duskylli » Tue Apr 01, 2014 12:45 am
Its working perfectly now!!! Thanks so much for your help Feather!!!!!!
Attachments
feathersnake
Regular
Posts: 104 Joined: Fri Apr 13, 2012 8:05 pm
Completed: A Rose by Any Other Name
Projects: Color, You've Got Mail!
Organization: Olfix Productions
Tumblr: olfix
Deviantart: olfix
Contact:
#6
Post
by feathersnake » Tue Apr 01, 2014 12:50 am
You're very welcome! ^^ I'm glad you got it working.
This is for NaNo right? Good luck to you guys on finishing up~ The GUI looks great!
Duskylli
Regular
Posts: 175 Joined: Wed Mar 27, 2013 12:48 pm
Completed: The Mishka Effect, Fairly Dangerous.
Projects: Palette Swap
Contact:
#7
Post
by Duskylli » Tue Apr 01, 2014 5:17 am
Yep its for the our Nano game 'The Mishka Effect.' Thanks!