I'm trying to make an inventory screen that players will be able to access whenever they want. Screen will be full of little icons that will show an image or some flavor text when clicked on. So I figured an imagemap would be the easier way to do it. Also I'm fucking dumb as a brick so I'm looking for the easiest way to get it to work.
Just started it, so don't kill me for that pathetic code :
Code: Select all
screen inventory():
tag menu
zorder 100
imagemap:
ground "inventory/bg_inventory.png"
imagebutton:
focus_mask True
xpos 10
ypos 400
idle "imagebutton_retour.png" ###'Go back to game' button
action Hide("inventory")
Code: Select all
screen quick_menu():
zorder 100
if quick_menu:
hbox:
style_prefix "quick"
xalign 0.5
yalign 1.0
textbutton _("Inventory") action ShowMenu('inventory')
Thing work as intended. I can access the screen whenever I want with the quick menu, and I can quit it by using my button.
...except quitting this inventory screen makes all the other buttons, textbox, quick menu textbuttons,... from the previous screen disappear, only leaving the background.
I can get them to reappear by pushing the ESC key.
Is there a way to disable that ESC key thing ? I'd like it to be used like a simple pause screen, with the player getting back to where he left the game before clicking the inventory textbutton.
Since english is not my main language, here is the problem illustrated :
Accessing the inventory with the textbutton :
Using the "Back" button leaves to this :
Buttons and textbox appear again after pressing ESC :
Thx for your help and your time. ( >O_O)>