Map screen is negating quick_menu flags (despite if statements working)

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
Bryy
Veteran
Posts: 407
Joined: Thu Dec 20, 2012 10:12 pm
Completed: 30+ games so far
Projects: Furry Shakespeare
Organization: Stegalosaurus Game Development
Location: Portage, MI
Contact:

Map screen is negating quick_menu flags (despite if statements working)

#1 Post by Bryy »

Here is my code for when you enter the map menu:

Code: Select all

        "MAP":
            $map_open = True
            $quick_menu = False
            call screen preferences
            jump trail
And here is my code for when you enter a new area via the map:

Code: Select all

label trail:
    $map_open = False
    $quick_menu = True
But, for some reason, it refuses to show the quick menu (which is an overlay) after I use the map screen, even though it still recognizes if quick_menu statements as valid.

My quick_menu code:

Code: Select all

screen quick_menu():

    ## Ensure this appears on top of other screens.
    zorder 100
    if quick_menu:
        $ui.imagebutton ("gui/SETTINGS2.png","gui/SETTINGS.png", xpos=1650, ypos=15, clicked=ShowMenu('preferences'))

## This code ensures that the quick_menu screen is displayed in-game, whenever
## the player has not explicitly hidden the interface.
init python:
    config.overlay_screens.append("quick_menu")

default quick_menu = False

style quick_button is default
style quick_button_text is button_text

style quick_button:
    properties gui.button_properties("quick_button")

style quick_button_text:
    properties gui.button_text_properties("quick_button")
Yes, it doesn't work if I turn my default to True, either.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Map screen is negating quick_menu flags (despite if statements working)

#2 Post by Imperf3kt »

It may be because of ui.imagebutton.
ui. functions were deprecated a long time ago (many years)

imagebutton is much different to what you've typed, I suggest using a modern imagebutton.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Bryy
Veteran
Posts: 407
Joined: Thu Dec 20, 2012 10:12 pm
Completed: 30+ games so far
Projects: Furry Shakespeare
Organization: Stegalosaurus Game Development
Location: Portage, MI
Contact:

Re: Map screen is negating quick_menu flags (despite if statements working)

#3 Post by Bryy »

Okay, thank you.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]