Quick Menu

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.
Message
Author
User avatar
Abby_tefy
Newbie
Posts: 11
Joined: Mon Sep 30, 2019 11:43 pm
Projects: Campamento de Amor
Location: Argentina
Contact:

Quick Menu

#1 Post by Abby_tefy » Tue Oct 01, 2019 12:49 am

Hello everyone! I need someone to help me because I have no idea how to fix it ... I don't know anything about programming so I apologize ...
My problem is the following. Edit "confirm popup" and renpy "input" to appear in the image attached

https://drive.google.com/file/d/1xPFnOa ... qIfOt/view
(Sorry but I don't know why you won't let me load the image :cry: )

I don't want the quick menu to be seen. I tried to hide it with the "window hide" but nothing happens ...
How can I hide it so that the picture looks alone?

Sorry if English is bad, I'm using the google translator...
From already thank you very much...

User avatar
namastaii
Eileen-Class Veteran
Posts: 1310
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: deadseed
itch: lunalucid
Location: USA
Contact:

Re: Quick Menu

#2 Post by namastaii » Tue Oct 01, 2019 2:05 am

Window is for the textbox.
If you want to hide the quick_menu at any point, you'd use $ quick_menu = False
Though, I'm not sure the best way you can do this attached to the confirm screen.
When the confirm screen is shown, it prevents the person from clicking anything else so because of this, they can't click the quick_menu anyway. (since quick_menu has modal = True)
does that make sense?

User avatar
Abby_tefy
Newbie
Posts: 11
Joined: Mon Sep 30, 2019 11:43 pm
Projects: Campamento de Amor
Location: Argentina
Contact:

Re: Quick Menu

#3 Post by Abby_tefy » Tue Oct 01, 2019 2:47 am

namastaii wrote:
Tue Oct 01, 2019 2:05 am
Window is for the textbox.
If you want to hide the quick_menu at any point, you'd use $ quick_menu = False
Though, I'm not sure the best way you can do this attached to the confirm screen.
When the confirm screen is shown, it prevents the person from clicking anything else so because of this, they can't click the quick_menu anyway. (since quick_menu has modal = True)
does that make sense?
I will try what you told me.

The problem is that when the confirmation window appears, the quick menu can be used, so I want to hide it. What did you mean?

User avatar
namastaii
Eileen-Class Veteran
Posts: 1310
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: deadseed
itch: lunalucid
Location: USA
Contact:

Re: Quick Menu

#4 Post by namastaii » Tue Oct 01, 2019 2:59 am

You can't use the quick_menu if the confirm screen has modal = True

User avatar
Abby_tefy
Newbie
Posts: 11
Joined: Mon Sep 30, 2019 11:43 pm
Projects: Campamento de Amor
Location: Argentina
Contact:

Re: Quick Menu

#5 Post by Abby_tefy » Wed Oct 02, 2019 8:31 pm

namastaii wrote:
Tue Oct 01, 2019 2:59 am
You can't use the quick_menu if the confirm screen has modal = True
I have tried it and it still appears ... I looked at the Confirm screen and it has as mentioned the modal True. But it still allows you to access the quick access menu :cry:

User avatar
eezergoode
Regular
Posts: 51
Joined: Tue Aug 29, 2006 10:55 am
Contact:

Re: Quick Menu

#6 Post by eezergoode » Wed Oct 02, 2019 9:28 pm

Maybe, right before you call the Confirm screen, add

Code: Select all

$ quick_menu = False
Then, once you return from the screen,

Code: Select all

$ quick_menu = True
I can confirm (no pun intended) that when I call the confirm screen in my test game, the quick menu is still usable while the confirm dialogue is up. I can't click any other items I have showing, but I can still use the quick menu.
Eezergoode - AKA Rabid Penguin
Team Lead
Image
It does not matter how slowly you go so long as you do not stop.
Confucius
Chinese philosopher & reformer (551 BC - 479 BC)

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

Re: Quick Menu

#7 Post by Imperf3kt » Thu Oct 03, 2019 12:27 am

I had a similar issue with the quick menu where I only wanted it to show if and only if the say window was showing otherwise it looked disembodied and weird and wasn't needed when the say window wasn't showing anyway.

An automatic fix is to use this in the quick menu:

Code: Select all

 
    if renpy.get_screen("say"):
        #quick menu contents
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

User avatar
Abby_tefy
Newbie
Posts: 11
Joined: Mon Sep 30, 2019 11:43 pm
Projects: Campamento de Amor
Location: Argentina
Contact:

Re: Quick Menu

#8 Post by Abby_tefy » Fri Oct 04, 2019 12:21 pm

eezergoode wrote:
Wed Oct 02, 2019 9:28 pm
Maybe, right before you call the Confirm screen, add

Code: Select all

$ quick_menu = False
Then, once you return from the screen,

Code: Select all

$ quick_menu = True
I can confirm (no pun intended) that when I call the confirm screen in my test game, the quick menu is still usable while the confirm dialogue is up. I can't click any other items I have showing, but I can still use the quick menu.
I tried ... But maybe I do it wrong. In the script before calling renpy.input I placed $ quick_menu = False

keep doing the same ... Is it okay where I placed the action?

User avatar
Abby_tefy
Newbie
Posts: 11
Joined: Mon Sep 30, 2019 11:43 pm
Projects: Campamento de Amor
Location: Argentina
Contact:

Re: Quick Menu

#9 Post by Abby_tefy » Fri Oct 04, 2019 12:24 pm

eezergoode wrote:
Wed Oct 02, 2019 9:28 pm

I can confirm (no pun intended) that when I call the confirm screen in my test game, the quick menu is still usable while the confirm dialogue is up. I can't click any other items I have showing, but I can still use the quick menu.
Sure! That is what happens... :cry:

User avatar
Abby_tefy
Newbie
Posts: 11
Joined: Mon Sep 30, 2019 11:43 pm
Projects: Campamento de Amor
Location: Argentina
Contact:

Re: Quick Menu

#10 Post by Abby_tefy » Fri Oct 04, 2019 12:35 pm

Imperf3kt wrote:
Thu Oct 03, 2019 12:27 am
I had a similar issue with the quick menu where I only wanted it to show if and only if the say window was showing otherwise it looked disembodied and weird and wasn't needed when the say window wasn't showing anyway.

An automatic fix is to use this in the quick menu:

Code: Select all

 
    if renpy.get_screen("say"):
        #quick menu contents
Pardon my ignorance. That code should I place on the quick menu screen?

User avatar
namastaii
Eileen-Class Veteran
Posts: 1310
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: deadseed
itch: lunalucid
Location: USA
Contact:

Re: Quick Menu

#11 Post by namastaii » Fri Oct 04, 2019 1:42 pm

Abby_tefy wrote:
Fri Oct 04, 2019 12:35 pm
Imperf3kt wrote:
Thu Oct 03, 2019 12:27 am
I had a similar issue with the quick menu where I only wanted it to show if and only if the say window was showing otherwise it looked disembodied and weird and wasn't needed when the say window wasn't showing anyway.

An automatic fix is to use this in the quick menu:

Code: Select all

 
    if renpy.get_screen("say"):
        #quick menu contents
Pardon my ignorance. That code should I place on the quick menu screen?
yes put it right above the line that says "if quick_menu" and then indent everything as needed.

User avatar
hell_oh_world
Regular
Posts: 179
Joined: Fri Jul 12, 2019 5:21 am
Projects: The Button Man
Organization: NILA
Contact:

Re: Quick Menu

#12 Post by hell_oh_world » Fri Oct 04, 2019 6:26 pm

Abby_tefy wrote:
Fri Oct 04, 2019 12:24 pm
eezergoode wrote:
Wed Oct 02, 2019 9:28 pm

I can confirm (no pun intended) that when I call the confirm screen in my test game, the quick menu is still usable while the confirm dialogue is up. I can't click any other items I have showing, but I can still use the quick menu.
Sure! That is what happens... :cry:
This happens I guess because of the zorder property in the quick_menu or the layer where it appears, because for all I know renpy places different elements on different layers, though I have a vague memory of it. Same idea to it, maybe you can add a zorder property to the confirm screen make it a higher number than the quick_menu's zorder like 999.

User avatar
Abby_tefy
Newbie
Posts: 11
Joined: Mon Sep 30, 2019 11:43 pm
Projects: Campamento de Amor
Location: Argentina
Contact:

Re: Quick Menu

#13 Post by Abby_tefy » Fri Oct 04, 2019 10:08 pm

namastaii wrote:
Fri Oct 04, 2019 1:42 pm

yes put it right above the line that says "if quick_menu" and then indent everything as needed.
Sorry but it's hard for me to understand ...
This is the quick menu screen:

Code: Select all

screen quick_menu():

    ## Asegura que esto aparezca en la parte superior de otras pantallas.
    zorder 100

    hbox:
        style_group "quick"


        imagebutton auto "gui/button/quick_historial_%s.png" xpos 25 ypos 430 focus_mask  True action ShowMenu('history')
        imagebutton auto "gui/button/quick_saltar_%s.png"    xpos -110 ypos 0 focus_mask  True action Skip() alternate Skip(fast=True, confirm=True)
        imagebutton auto "gui/button/quick_guardar_%s.png"   xpos -124 ypos 430 focus_mask  True action ShowMenu('save')
        imagebutton auto "gui/button/quick_config_%s.png"    xpos -124 ypos 430 focus_mask  True action ShowMenu('preferences')

    
## Este código asegura que la pantalla 'quick_menu' se muestra en el juego,
## mientras el jugador no haya escondido explícitamente la interfaz.
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")
Where would I put the code they told me?

User avatar
Abby_tefy
Newbie
Posts: 11
Joined: Mon Sep 30, 2019 11:43 pm
Projects: Campamento de Amor
Location: Argentina
Contact:

Re: Quick Menu

#14 Post by Abby_tefy » Fri Oct 04, 2019 10:11 pm

hell_oh_world wrote:
Fri Oct 04, 2019 6:26 pm
Abby_tefy wrote:
Fri Oct 04, 2019 12:24 pm
eezergoode wrote:
Wed Oct 02, 2019 9:28 pm

I can confirm (no pun intended) that when I call the confirm screen in my test game, the quick menu is still usable while the confirm dialogue is up. I can't click any other items I have showing, but I can still use the quick menu.
Sure! That is what happens... :cry:
This happens I guess because of the zorder property in the quick_menu or the layer where it appears, because for all I know renpy places different elements on different layers, though I have a vague memory of it. Same idea to it, maybe you can add a zorder property to the confirm screen make it a higher number than the quick_menu's zorder like 999.
I have noticed and the confirmation screen has a higher number in the zorder than in the quick menu

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

Re: Quick Menu

#15 Post by Imperf3kt » Sat Oct 05, 2019 4:42 am

Code: Select all

screen quick_menu():

    ## Asegura que esto aparezca en la parte superior de otras pantallas.
    zorder 100
This part of your code creates the screen and sets the zorder (where it appears in front or behind other things)
The next section of your code is the actual content of the screen - the stuff that goes inside the screen.

Code: Select all

hbox:
        style_group "quick"


        imagebutton auto "gui/button/quick_historial_%s.png" xpos 25 ypos 430 focus_mask  True action ShowMenu('history')
        imagebutton auto "gui/button/quick_saltar_%s.png"    xpos -110 ypos 0 focus_mask  True action Skip() alternate Skip(fast=True, confirm=True)
        imagebutton auto "gui/button/quick_guardar_%s.png"   xpos -124 ypos 430 focus_mask  True action ShowMenu('save')
        imagebutton auto "gui/button/quick_config_%s.png"    xpos -124 ypos 430 focus_mask  True action ShowMenu('preferences') 
The final part of your code isn't part of the screen, but it is necessary for styling the screen.

Code: Select all

## Este código asegura que la pantalla 'quick_menu' se muestra en el juego,
## mientras el jugador no haya escondido explícitamente la interfaz.
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")
Where would I put the code they told me?
To use the line of code I suggested, place it between the first and second section of your code, making sure to add four spaces to the start of each line in the second section.

Code: Select all

screen quick_menu():

    ## Asegura que esto aparezca en la parte superior de otras pantallas.
    zorder 100
    
    if renpy.get_screen("say"):
        hbox:
            style_group "quick"


            imagebutton auto "gui/button/quick_historial_%s.png" xpos 25 ypos 430 focus_mask  True action ShowMenu('history')
            imagebutton auto "gui/button/quick_saltar_%s.png"    xpos -110 ypos 0 focus_mask  True action Skip() alternate Skip(fast=True, confirm=True)
            imagebutton auto "gui/button/quick_guardar_%s.png"   xpos -124 ypos 430 focus_mask  True action ShowMenu('save')
            imagebutton auto "gui/button/quick_config_%s.png"    xpos -124 ypos 430 focus_mask  True action ShowMenu('preferences') 
    
Using this, if renpy.get_screen detects the say window (the screen responsible for displaying dialogue) is showing, the content in the quick menu is used.
If it detects the say window is hidden, such as when you bring up the confirm screen, it instead uses nothing and the quick menu is empty.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]