From 7115379ccf5714816eeb91fc16d3a63e019c8082 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 14 Feb 2021 14:53:17 +0100 Subject: Adds user configurable key bindings --- UI/Menu/KeyBindings.tscn | 123 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 UI/Menu/KeyBindings.tscn (limited to 'UI/Menu/KeyBindings.tscn') diff --git a/UI/Menu/KeyBindings.tscn b/UI/Menu/KeyBindings.tscn new file mode 100644 index 0000000..948b44b --- /dev/null +++ b/UI/Menu/KeyBindings.tscn @@ -0,0 +1,123 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://UI/Menu/KeyBindings.gd" type="Script" id=1] + +[node name="KeyBindings" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 64.0 +margin_top = 64.0 +margin_right = -64.0 +margin_bottom = -88.0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Panel" type="Panel" parent="."] +margin_right = 896.0 +margin_bottom = 448.0 + +[node name="VBoxContainer" type="VBoxContainer" parent="Panel"] +margin_left = 256.0 +margin_top = 24.0 +margin_right = 640.0 +margin_bottom = 424.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="DIRECTION_LEFT" type="HBoxContainer" parent="Panel/VBoxContainer"] +margin_right = 384.0 +margin_bottom = 20.0 + +[node name="Label" type="Label" parent="Panel/VBoxContainer/DIRECTION_LEFT"] +margin_top = 3.0 +margin_right = 24.0 +margin_bottom = 17.0 +text = "Left" + +[node name="Input" type="Button" parent="Panel/VBoxContainer/DIRECTION_LEFT"] +margin_left = 28.0 +margin_right = 40.0 +margin_bottom = 20.0 + +[node name="Clear" type="Button" parent="Panel/VBoxContainer/DIRECTION_LEFT"] +margin_left = 44.0 +margin_right = 88.0 +margin_bottom = 20.0 +text = "Clear" + +[node name="DIRECTION_RIGHT" type="HBoxContainer" parent="Panel/VBoxContainer"] +margin_top = 24.0 +margin_right = 384.0 +margin_bottom = 44.0 + +[node name="Label" type="Label" parent="Panel/VBoxContainer/DIRECTION_RIGHT"] +margin_top = 3.0 +margin_right = 32.0 +margin_bottom = 17.0 +text = "Right" + +[node name="Input" type="Button" parent="Panel/VBoxContainer/DIRECTION_RIGHT"] +margin_left = 36.0 +margin_right = 48.0 +margin_bottom = 20.0 + +[node name="Clear" type="Button" parent="Panel/VBoxContainer/DIRECTION_RIGHT"] +margin_left = 52.0 +margin_right = 96.0 +margin_bottom = 20.0 +text = "Clear" + +[node name="JUMP" type="HBoxContainer" parent="Panel/VBoxContainer"] +margin_top = 48.0 +margin_right = 384.0 +margin_bottom = 68.0 + +[node name="Label" type="Label" parent="Panel/VBoxContainer/JUMP"] +margin_top = 3.0 +margin_right = 32.0 +margin_bottom = 17.0 +text = "Jump" + +[node name="Input" type="Button" parent="Panel/VBoxContainer/JUMP"] +margin_left = 36.0 +margin_right = 48.0 +margin_bottom = 20.0 + +[node name="Clear" type="Button" parent="Panel/VBoxContainer/JUMP"] +margin_left = 52.0 +margin_right = 96.0 +margin_bottom = 20.0 +text = "Clear" + +[node name="RUN" type="HBoxContainer" parent="Panel/VBoxContainer"] +margin_top = 72.0 +margin_right = 384.0 +margin_bottom = 92.0 + +[node name="Label" type="Label" parent="Panel/VBoxContainer/RUN"] +margin_top = 3.0 +margin_right = 24.0 +margin_bottom = 17.0 +text = "Run" + +[node name="Input" type="Button" parent="Panel/VBoxContainer/RUN"] +margin_left = 28.0 +margin_right = 40.0 +margin_bottom = 20.0 + +[node name="Clear" type="Button" parent="Panel/VBoxContainer/RUN"] +margin_left = 44.0 +margin_right = 88.0 +margin_bottom = 20.0 +text = "Clear" +[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_LEFT/Input" to="." method="_on_Input_pressed" binds= [ "DIRECTION_LEFT" ]] +[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_LEFT/Clear" to="." method="_on_Clear_pressed" binds= [ "DIRECTION_LEFT" ]] +[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_RIGHT/Input" to="." method="_on_Input_pressed" binds= [ "DIRECTION_RIGHT" ]] +[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_RIGHT/Clear" to="." method="_on_Clear_pressed" binds= [ "DIRECTION_RIGHT" ]] +[connection signal="pressed" from="Panel/VBoxContainer/JUMP/Input" to="." method="_on_Input_pressed" binds= [ "JUMP" ]] +[connection signal="pressed" from="Panel/VBoxContainer/JUMP/Clear" to="." method="_on_Clear_pressed" binds= [ "JUMP" ]] +[connection signal="pressed" from="Panel/VBoxContainer/RUN/Input" to="." method="_on_Input_pressed" binds= [ "RUN" ]] +[connection signal="pressed" from="Panel/VBoxContainer/RUN/Clear" to="." method="_on_Clear_pressed" binds= [ "RUN" ]] -- cgit v1.2.3