From 4eb49cc73241e0597174c4bfdfdddaf96dce86af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 1 Apr 2016 08:39:06 +0200 Subject: [PATCH] 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. --- demos/gui/input_mapping/controls.gd | 4 +++- demos/gui/input_mapping/controls.scn | Bin 2698 -> 2026 bytes 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/demos/gui/input_mapping/controls.gd b/demos/gui/input_mapping/controls.gd index 3cee6e6871b..f337353796b 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 98cbbca4645aa0eb8bba7c0368b8f6c0b2dcf55e..7894212fb7f385907ffcb5c2e1fd53509b584455 100644 GIT binary patch literal 2026 zcmY*a4R8}x9{+DP?Y2!rgDLbA@{%%^79>!rg@!3_lN4G$EVh=y_0HW*x=oiPn@o1o zugu}nQb7h~P~;rGE=9B`BMuJdP353f3Z9-|PsXFdT}e=ZJ5Ldmse^jl>wV0~&iv=S znfLp8@BMeTzQN^!$;SkcmId%J13&?26zEVYP;nYE5tF$_@cPA;2CpcK(2q@tG5{Jm zU<#tAL_{SNjd(@7ECfYJM^hQj6O~&6VhcYrRq;louxi&*`R%|U8#M6KD0l#6pryu2 zyWJa-)kr9y%=5MIvmgWI=>s9J5I_aG1u%w;81S13`thk8@)yg0mx3I{O#dfNK*2VL^{gd?6JU zt$WgCm1~z2$rBLy=8S+O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