(SOLVED) Only show Quickmenu with Textbox

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
theravano
Newbie
Posts: 6
Joined: Wed Aug 02, 2017 3:10 pm
Organization: Bearcade Games
itch: bearcade
Contact:

(SOLVED) Only show Quickmenu with Textbox

#1 Post by theravano »

Hello!
Anyone knows a way to show my Quickmenu only when the textbox is on screen?

Here's my code, in screens.rpy

Code: Select all

screen quick_menu():

    zorder 100
    if quick_menu:
        hbox:
            style_prefix "quick"

            xalign 0.5
            yalign 1.0

         
            imagemap:
                ground 'GUI/quick menu/qm_ground.png'
                hover 'GUI/quick menu/qm_hover.png'
        
                alpha True
        
                hotspot (890,500,240,60) action Preference("auto-forward", "toggle") 
                hotspot (890, 540, 240, 60) action Skip()
                hotspot (890, 600, 240, 60) action ShowMenu("save")
                hotspot (890, 643, 240, 60) action ShowMenu("preferences")

                
init python:
    config.overlay_screens.append("quick_menu")

default quick_menu = True

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")
There's a way to fuse it with the say screen or make it change/call it?
Thanks!
Last edited by theravano on Sat Aug 19, 2017 12:18 pm, edited 1 time in total.

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Only show Quickmenu with Textbox

#2 Post by Remix »

comment out:

Code: Select all

# init python:
#     config.overlay_screens.append("quick_menu")

alter screen say:

Code: Select all

screen say(who, what):
    style_prefix "say"

    window:
        id "window"

        if who is not None:

            window:
                style "namebox"
                text who id "who"

        text what id "what"
    
    # add this bit
    use quick_menu
Should work
Frameworks & Scriptlets:

theravano
Newbie
Posts: 6
Joined: Wed Aug 02, 2017 3:10 pm
Organization: Bearcade Games
itch: bearcade
Contact:

Re: Only show Quickmenu with Textbox

#3 Post by theravano »

Worked like a charm! Thank you!

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot]