1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

[Keychain] Fix issue with menu events being triggered by actions that are not exact matches

This commit is contained in:
Emmanouil Papadeas 2022-07-07 15:54:39 +03:00
parent a368ea500a
commit f8c74948b3

View file

@ -83,7 +83,7 @@ class MenuInputAction:
func handle_input(event: InputEvent, action: String) -> bool:
if not node:
return false
if event.is_action_pressed(action):
if event.is_action_pressed(action, false, true):
if event is InputEventKey:
var acc: int = node.get_item_accelerator(menu_item_id)
# If the event is the same as the menu item's accelerator, skip
@ -91,7 +91,7 @@ class MenuInputAction:
return true
node.emit_signal("id_pressed", menu_item_id)
return true
if event.is_action(action) and echo:
if event.is_action(action, true) and echo:
if event.is_echo():
node.emit_signal("id_pressed", menu_item_id)
return true