Iam a noob.
This is my first post so I am also checking the weather around here.
I am trying to make an inventory_button screen to display an inventory_bar screen.
Then, in the inventory_bar screen, there is also a button who is identical (the image) to the one of inventory_button.
When clicked, i want it to close the inventory_bar screen. This is working. But this doesnt close the defaut say screen.
Because the defaut "say" screen and his window dosent have any tag that i can use to replace them.
Some images to give you an idea of what iam trying to make :
There is my code :
Code: Select all
image 0-0-inv-butt-small = "gui/inventory_button.png"
image 0-0-inv-butt-small-hover = "gui/inventory_button_hover.png"
image 0-0-inv-butt-small-insensitive = "gui/inventory_button_insensitive.png"
screen inventory_button:
modal False
imagebutton:
keysym "i"
xpos 0.806 ypos 0.859
insensitive "0-0-inv-button-small-insensitive"
idle "0-0-inv-button-small"
hover "0-0-inv-button-small-hover"
action Show("inventory_bar") # <--- Here, I can solve my probleme by writing this : action ShowMenu("inventory_bar")
# but after the inventory_bar screen is displayed, the game is stuck until i hit escape.
screen inventory_bar:
modal False
tag window
image "gui/Inventory open_bar.png":
xpos 0.0 ypos 0.77
imagebutton:
xpos 0.806 ypos 0.859
idle "0-0-inv-button-small"
hover "0-0-inv-button-small-hover"
action Hide("inventory_bar") # <--- Here, i would like to HIDE the default "say" screen and window with the name of the speaker and everything.
Of course I know how to hide it in my script labels with this command : window hide.
But saddly this command doesnt work inside a screen(). So i would like to know if it's at least possible.
So if you could help me fixe this it will be great !
PS : And by the way, if you think my way of coding this thing suck, do not hesistate to tell me (as long as you suggest something better ^^).