summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-04-01 08:39:06 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-04-01 08:39:18 +0200
commit4eb49cc73241e0597174c4bfdfdddaf96dce86af (patch)
treefeab525493454f02d13b3115b23dcb096faee4b4 /demos
parent3cc7b6fa5ddaea8cbc29a32ede638834ef83de56 (diff)
Fix last two bindings in input_mapping demo
Also connect the signal from script, as it makes it easier to understand than by having to check the connected signals via the GUI.
Diffstat (limited to 'demos')
-rw-r--r--demos/gui/input_mapping/controls.gd4
-rw-r--r--demos/gui/input_mapping/controls.scnbin2698 -> 2026 bytes
2 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])
diff --git a/demos/gui/input_mapping/controls.scn b/demos/gui/input_mapping/controls.scn
index 98cbbca464..7894212fb7 100644
--- a/demos/gui/input_mapping/controls.scn
+++ b/demos/gui/input_mapping/controls.scn
Binary files differ