浏览代码

:wrench: Create custom input for slide management

In order to truly exploit custom controls for slides.
DricomDragon 2 年之前
父节点
当前提交
59104346c7
共有 2 个文件被更改,包括 27 次插入4 次删除
  1. 23 0
      godot/project.godot
  2. 4 4
      godot/run/root.tscn

+ 23 - 0
godot/project.godot

@@ -29,6 +29,29 @@ texture={
 "svg/scale": 8.0
 }
 
+[input]
+
+finish={
+"deadzone": 0.5,
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"echo":false,"script":null)
+]
+}
+skip={
+"deadzone": 0.5,
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"echo":false,"script":null)
+]
+}
+previous={
+"deadzone": 0.5,
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194308,"key_label":0,"unicode":0,"echo":false,"script":null)
+]
+}
+home={
+"deadzone": 0.5,
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null)
+]
+}
+
 [rendering]
 
 environment/defaults/default_clear_color=Color(1, 1, 1, 1)

+ 4 - 4
godot/run/root.tscn

@@ -93,10 +93,10 @@ scope_trans = 10
 
 [node name="Show" parent="Board" instance=ExtResource("2_cih7e")]
 hide_slides = true
-action_finish_slide = "ui_right"
-action_skip_slide = "ui_down"
-action_previous_slide = "ui_up"
-action_home_slide = "ui_left"
+action_finish_slide = "finish"
+action_skip_slide = "skip"
+action_previous_slide = "previous"
+action_home_slide = "home"
 
 [node name="World" parent="Board/Show" instance=ExtResource("3_s3lgd")]
 scale = Vector2(10, 10)