I've implemented a cheat hud in my game for beta testing in order to add or remove crush points (which is a system I'm using to determine relationship progress) to a specific girl, and I have mapped the screen call to a specific key combo which works, however when the Enter key is pressed it activates the given cheat but also progresses dialogue, as if there were no screen showing.
Here is my screen code:
Code: Select all
screen cheat_hud():
zorder 200
window:
xalign 0
xfill False
xpadding 0
ypadding 0
yalign 0
background Image("gui/cheat_hud_bg.png", xalign=0, yalign=0)
default cheat = ""
vbox:
text "Enter cheat here" size 13
input:
value ScreenVariableInputValue("cheat") size 12
button:
text "Submit" size 14
action Call("process_cheat", cheat)
keysym 'K_RETURN'
alternate_keysym 'K_KP_ENTER'In order for the user to toggle the cheat hud itself, I use:
Code: Select all
screen cheat_toggle:
if renpy.get_screen("cheat_hud"):
key "alt_shift_K_SLASH" action Hide("cheat_hud")
else:
key "alt_shift_K_SLASH" action Show("cheat_hud")