Changing Quick Menu Style Ingame [Solved]

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
roankun
Regular
Posts: 94
Joined: Fri Jun 11, 2010 4:01 am
Projects: RHS
Contact:

Changing Quick Menu Style Ingame [Solved]

#1 Post by roankun » Sat Mar 03, 2012 11:18 pm

I changed the screen a bit to something like this to make a different style for the quick menu when changing between my two characters' POV.

Code: Select all

screen quick_menu:

    # Add an in-game quick menu.
    if POV = True:
        vbox:
            style_group "uiquick"
            
            xalign 1.0
            yalign 0.97

            textbutton _("Q.Save") action QuickSave()
            textbutton _("Q.Load") action QuickLoad()
            textbutton _("Skip") action Skip()
            textbutton _("Auto") action Preference("auto-forward", "toggle")
            
    else:
        vbox:
            style_group "quick"
    
            xalign 1.0
            yalign 0.97

            textbutton _("Q.Save") action QuickSave()
            textbutton _("Q.Load") action QuickLoad()
            textbutton _("Skip") action Skip()
            textbutton _("Auto") action Preference("auto-forward", "toggle")

        
init -2 python:
    
    style.quick_button.set_parent('default')
    style.quick_button.background = "Screens/quickbutton.png"
    style.quick_button.xminimum = 70
    style.quick_button.left_padding = 10
    
    style.quick_button_text.set_parent('default')
    style.quick_button_text.size = 15
    style.quick_button_text.idle_color = "#8888"
    style.quick_button_text.hover_color = "#ccc"
    style.quick_button_text.selected_idle_color = "#cc08"
    style.quick_button_text.selected_hover_color = "#cc0"
    style.quick_button_text.insensitive_color = "#4448"

    
    style.uiquick_button.set_parent('quick')
    style.uiquick_button.background = "Screens/quickbutton2.png"
    style.uiquick_button.xminimum = 70
    style.uiquick_button_text.size = 15
    style.uiquick_button_text.left_padding = 10
    style.uiquick_button_text.idle_color = "#fff"
    style.uiquick_button_text.hover_color = "#fff"
    style.uiquick_button_text.selected_idle_color = "#fff"
    style.uiquick_button_text.selected_hover_color = "#fff"
    style.uiquick_button_text.insensitive_color = "#fff"
And then I just added this to script.rpy

Code: Select all

label start:

    $ POV = False 
    k "Character k GUI."
    $ POV = True
    u "Character u GUI"

    return
But for some reason, it doesn't work. Granted, I'm not sure if it should, but well...
The quick menu takes the style of the first mentioned. If I move interchange the style_group, they both work just fine. Just that, it doesn't change ingame. :( Help?
Last edited by roankun on Sat Mar 03, 2012 11:33 pm, edited 1 time in total.
I don't have any kind words to spare to someone who already has all the reason in the world to feel good about himself.
http://roankun.wordpress.com/

User avatar
Camille
Eileen-Class Veteran
Posts: 1227
Joined: Sat Apr 23, 2011 2:43 pm
Completed: Please see http://trash.moe
Projects: the head well lost
Organization: L3
Tumblr: narihira
Deviantart: crownwaltz
itch: lore
Contact:

Re: Changing Quick Menu Style Ingame

#2 Post by Camille » Sat Mar 03, 2012 11:23 pm

"if POV = True:" should be "if POV == True:" or simply "if POV". (false is "if not POV")

User avatar
roankun
Regular
Posts: 94
Joined: Fri Jun 11, 2010 4:01 am
Projects: RHS
Contact:

Re: Changing Quick Menu Style Ingame

#3 Post by roankun » Sat Mar 03, 2012 11:32 pm

OOOOOOOO.ooooooooo
OMG, I totally forgot that. :oops: Thanks!!!!!!! It works like a charm!
My hero <3
I don't have any kind words to spare to someone who already has all the reason in the world to feel good about himself.
http://roankun.wordpress.com/

Post Reply

Who is online

Users browsing this forum: No registered users