Page 1 of 1

modal True except one screen

Posted: Thu May 27, 2021 12:07 pm
by Yuvan raj
Hello, I'm using a modal True statement on a screen so that the game won't proceed and other buttons won't be clicked. But I want to make an exception to the modal True statement. I want the screen containing the buttons 'my stats, characters stats, skip time, etc' to be clickable.

This is what my game inside looks like. On the right side there are several buttons.
Image

If I click one button this screen will pop up. I used modal True in this screen as I don't want the game to proceed when the player mistakenly click the sides. But I want the right side buttons to be interactable. I could put this modal true screen inside the button screen and use conditional statement to make it appear and also put the modal true statement the same condition so that when this screen appears the modal true statement will also run and can give me the result that I want. But I want to learn whether there is a way to make an expection for modal true or another way to accomplish what I want.
Image
Thank you in advance.

Re: modal True except one screen

Posted: Thu May 27, 2021 7:29 pm
by laure44
One way I can think of is putting the menu on the right in its own screen, then having the menu screen inside the other one with use

This is how it works for the navigation menu (for exemple, save and load screens both use the navigation menu).

It would look like this:

Code: Select all

screen somemenu():
    textbutton _("Button 1")
    textbutton _("Button 2")
    textbutton _("Button 3")
    # etc
    
screen somescreen():
    modal True
    use somemenu

Re: modal True except one screen

Posted: Fri May 28, 2021 2:31 am
by Yuvan raj
laure44 wrote: Thu May 27, 2021 7:29 pm One way I can think of is putting the menu on the right in its own screen, then having the menu screen inside the other one with use

This is how it works for the navigation menu (for exemple, save and load screens both use the navigation menu).

It would look like this:

Code: Select all

screen somemenu():
    textbutton _("Button 1")
    textbutton _("Button 2")
    textbutton _("Button 3")
    # etc
    
screen somescreen():
    modal True
    use somemenu
Thank you! Your menthod was simpler than my 'condition' method. Only needed few edits. So I take it that there is no way to make an exception for the modat True statement? like a statment 'modal True except "some screen" '? But no problem I accomplished what I wanted. Thank you once again!