Style Menu in screen="airport"

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
skulldred
Newbie
Posts: 2
Joined: Thu Apr 16, 2020 1:55 pm
Contact:

Style Menu in screen="airport"

#1 Post by skulldred »

Hi everyone

I found in the Renpy docs following Code: menu ("jfk", screen="airport"):
I like to have the questions in the airport but i dont know how to style it.
If i change define gui.choice_button it dont apply to the menu in the airport.
Can someone tell me right direction?

Thanks lot for reading.

cheers Skulldred

skulldred
Newbie
Posts: 2
Joined: Thu Apr 16, 2020 1:55 pm
Contact:

Re: Style Menu in screen="airport"

#2 Post by skulldred »

Hi everyone

So i found now a lot but it still not work.
I tired:
style.menu_choice.color = "#fff"
style.menu_choice.hover_color = "#000"

But i get the error: expected 'word' not found

Styleinspector tells me that the name shloud be correct. I found this code also on the web.

I just need a hint how to use this style. And why is it different to the gui.rpy?
Should i store this two lines also in gui.rpy or ?

vital1970
Newbie
Posts: 7
Joined: Sat May 30, 2020 9:38 pm
Contact:

Re: Style Menu in screen="airport"

#3 Post by vital1970 »

Try using styles.
style menu:
style menu_window:
style menu_choice_chosen_button:
style menu_choice_chosen:
They are visible via shift+i

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Style Menu in screen="airport"

#4 Post by Alex »

skulldred wrote: Fri Apr 17, 2020 9:42 am ...
Try

Code: Select all

screen airport(txt, items): # screen similar to original choice screen
    style_prefix "choice" #<--- change to your own style if needed

    vbox:
        text "~airport /[txt]/~" xalign 0.5
        for i in items:
            textbutton i.caption action i.action
    
# The game starts here.

label start:
    "..."
    menu jfk ("Some Name", screen="airport"):
        "Choice 1":
            "... ..."
            jump jfk
        "Choice 2":
            pass
    "?!"

vital1970
Newbie
Posts: 7
Joined: Sat May 30, 2020 9:38 pm
Contact:

Re: Style Menu in screen="airport"

#5 Post by vital1970 »


Post Reply

Who is online

Users browsing this forum: No registered users