Page 1 of 1

Changing Quick Menu Style Ingame [Solved]

Posted: Sat Mar 03, 2012 11:18 pm
by roankun
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?

Re: Changing Quick Menu Style Ingame

Posted: Sat Mar 03, 2012 11:23 pm
by Camille
"if POV = True:" should be "if POV == True:" or simply "if POV". (false is "if not POV")

Re: Changing Quick Menu Style Ingame

Posted: Sat Mar 03, 2012 11:32 pm
by roankun
OOOOOOOO.ooooooooo
OMG, I totally forgot that. :oops: Thanks!!!!!!! It works like a charm!
My hero <3