summaryrefslogtreecommitdiff
path: root/demos/gui/input_mapping/controls.gd
diff options
context:
space:
mode:
Diffstat (limited to 'demos/gui/input_mapping/controls.gd')
-rw-r--r--demos/gui/input_mapping/controls.gd4
1 files changed, 3 insertions, 1 deletions
diff --git a/demos/gui/input_mapping/controls.gd b/demos/gui/input_mapping/controls.gd
index 3cee6e6871..f337353796 100644
--- a/demos/gui/input_mapping/controls.gd
+++ b/demos/gui/input_mapping/controls.gd
@@ -51,4 +51,6 @@ func _ready():
# We assume that the key binding that we want is the first one (0), if there are several
input_event = InputMap.get_action_list(action)[0]
# See note at the beginning of the script
- get_node("bindings").get_node(action).get_node("Button").set_text(OS.get_scancode_string(input_event.scancode))
+ var button = get_node("bindings").get_node(action).get_node("Button")
+ button.set_text(OS.get_scancode_string(input_event.scancode))
+ button.connect("pressed", self, "wait_for_input", [action])