Not hiding the choice menu after a selection is made

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
slithery eyed wombat
Newbie
Posts: 15
Joined: Sat Jun 02, 2018 5:45 pm
Contact:

Not hiding the choice menu after a selection is made

#1 Post by slithery eyed wombat »

I've got a custom choice menu that displays images. However, after a user selects an option the menu fades away. This is an obvious way to handle it as a default, but I need to keep the menu up so the user can modify their choice if they choose.

Here's the code for my custom choice screen. It parses the string that it was passed to read an image that it displays.

Code: Select all

elif menu_style == "Cell Costumes":
        hbox:
            spacing 5
            pos (700, 250)
            for caption, action, chosen in items:
                hbox:
                    spacing 0
                    $ finder = caption[caption.find("(") + 1:caption.find(")")]
                    $ caption = caption.replace(" (%s)" % finder, "")
                    button:
                        add "%s" % finder
                        action action
                        style "costume_menu_button_style"
                        text caption style "costume_menu_text_style"
To provide more context: this is a costume choice menu. The user can choose a costume, see the character sprite update to the new costume, and then decide if they want to keep using that costume or change to another one.

Here's my menu code:

Code: Select all

label char_costume_menu:
    
    $ menu_style = "Cell Costumes"

    menu:

        "Casual (char1_costume_icon_casual)":
        
            hide char1 with dissolve

            $ char1_costume = 1
            
            pause 0.5
            
            show char1 at left with dissolve

            jump batgirl_costume_menu

        "Gymnast (char1_costume_icon_gymnast)":

            $ char1_costume = 2

            jump char1_costume_menu
It appears the act of hiding/showing the character (to achieve a fade out/fade in effect as the costume updates, rather than it being instantaneous) forces the menu to fade out as well. Is there a way to just fade out the character without the menu?

Post Reply

Who is online

Users browsing this forum: Sugar_and_rice