Ren'Py Hide Dialogue Box when clicking on imagebutton

PPanGames

Developer of Forbidden Passion and TlooB
Game Developer
May 8, 2019
311
2,716
Gonna need some help for my issue here. I made a Togglescreen imagebutton and when clicking on it, the UI features and dialogue box don't hide. I want the player to be able to always open up and close the screen in the game as well. Here is my code so far
Code:
screen phone():
    zorder 100
    imagebutton xalign 0.01 yalign 0.15:
        focus_mask True
        idle "...png"
        hover "...png"
        action ToggleScreen("multipleButtons")

screen multipleButtons:
    zorder 99
    add "....png"
    imagebutton:
        focus_mask True
        idle "...png"
        hover "...png"
        action Hide()
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,368
15,282
I made a Togglescreen imagebutton and when clicking on it, the UI features and dialogue box don't hide.
Why would they hide ? Togglescreen just show/hide a screen depending if it's already hidden/shown, there's no reason for it to hide the game interface.

And also, why should they hide ? If it's just to be sure that the player will not make the game advance if he click outside of a button, what you need it the screen property.
 

PPanGames

Developer of Forbidden Passion and TlooB
Game Developer
May 8, 2019
311
2,716
Why would they hide ? Togglescreen just show/hide a screen depending if it's already hidden/shown, there's no reason for it to hide the game interface.

And also, why should they hide ? If it's just to be sure that the player will not make the game advance if he click outside of a button, what you need it the screen property.
Setting modal to true is good for stopping the dialogue box from continueing but I also want to hide the Interface as long as the player has the screen open. I tried using HideInterface as an action but the screen won't appear as well.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,368
15,282
[...] but I also want to hide the Interface as long as the player has the screen open.
Then use in place of ToggleScreen, that is not needed since you don't use it to close the screen and want to hide the UI, therefore the button that opened it.