Skip to content

Commit

Permalink
Add more keyboard shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
OverloadedOrama committed Dec 2, 2024
1 parent 985fa5c commit 9dbea81
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
20 changes: 20 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,26 @@ show_pixel_indices={
"deadzone": 0.5,
"events": []
}
toggle_draw_tiles_mode={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194306,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
tile_edit_mode_manual={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"key_label":0,"unicode":33,"location":0,"echo":false,"script":null)
]
}
tile_edit_mode_auto={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"key_label":0,"unicode":64,"location":0,"echo":false,"script":null)
]
}
tile_edit_mode_stack={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":51,"key_label":0,"unicode":35,"location":0,"echo":false,"script":null)
]
}
tile_rotate_left={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":90,"location":0,"echo":false,"script":null)
Expand Down
30 changes: 29 additions & 1 deletion src/UI/TilesPanel.tscn
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
[gd_scene load_steps=14 format=3 uid="uid://bfbragmmdwfbl"]
[gd_scene load_steps=22 format=3 uid="uid://bfbragmmdwfbl"]

[ext_resource type="Script" path="res://src/UI/TilesPanel.gd" id="1_d2oc5"]
[ext_resource type="Texture2D" uid="uid://bv7ldl8obhawm" path="res://assets/graphics/misc/icon_reload.png" id="2_r1kie"]
[ext_resource type="Texture2D" uid="uid://bpsfilx47bw3r" path="res://assets/graphics/misc/mirror_x.svg" id="3_5o62r"]
[ext_resource type="Texture2D" uid="uid://bk6iaxiyl74ih" path="res://assets/graphics/misc/mirror_y.svg" id="4_2xhnr"]

[sub_resource type="InputEventAction" id="InputEventAction_klv67"]
action = &"toggle_draw_tiles_mode"

[sub_resource type="Shortcut" id="Shortcut_6ebuw"]
events = [SubResource("InputEventAction_klv67")]

[sub_resource type="InputEventAction" id="InputEventAction_yr0lx"]
action = &"tile_rotate_left"

Expand All @@ -31,6 +37,24 @@ events = [SubResource("InputEventAction_18g3a")]

[sub_resource type="ButtonGroup" id="ButtonGroup_uxnt0"]

[sub_resource type="InputEventAction" id="InputEventAction_mhgo3"]
action = &"tile_edit_mode_manual"

[sub_resource type="Shortcut" id="Shortcut_pgg48"]
events = [SubResource("InputEventAction_mhgo3")]

[sub_resource type="InputEventAction" id="InputEventAction_h1wos"]
action = &"tile_edit_mode_auto"

[sub_resource type="Shortcut" id="Shortcut_a0fx5"]
events = [SubResource("InputEventAction_h1wos")]

[sub_resource type="InputEventAction" id="InputEventAction_i4ufh"]
action = &"tile_edit_mode_stack"

[sub_resource type="Shortcut" id="Shortcut_ysxej"]
events = [SubResource("InputEventAction_i4ufh")]

[node name="Tiles" type="PanelContainer"]
anchors_preset = 15
anchor_right = 1.0
Expand All @@ -45,6 +69,7 @@ layout_mode = 2
[node name="PlaceTiles" type="CheckBox" parent="VBoxContainer"]
layout_mode = 2
mouse_default_cursor_shape = 2
shortcut = SubResource("Shortcut_6ebuw")
text = "Draw tiles"

[node name="TransformButtonsContainer" type="HFlowContainer" parent="VBoxContainer"]
Expand Down Expand Up @@ -126,19 +151,22 @@ layout_mode = 2
layout_mode = 2
mouse_default_cursor_shape = 2
button_group = SubResource("ButtonGroup_uxnt0")
shortcut = SubResource("Shortcut_pgg48")
text = "Manual"

[node name="Auto" type="CheckBox" parent="VBoxContainer/ModeButtonsContainer"]
layout_mode = 2
mouse_default_cursor_shape = 2
button_pressed = true
button_group = SubResource("ButtonGroup_uxnt0")
shortcut = SubResource("Shortcut_a0fx5")
text = "Auto"

[node name="Stack" type="CheckBox" parent="VBoxContainer/ModeButtonsContainer"]
layout_mode = 2
mouse_default_cursor_shape = 2
button_group = SubResource("ButtonGroup_uxnt0")
shortcut = SubResource("Shortcut_ysxej")
text = "Stack"

[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"]
Expand Down

0 comments on commit 9dbea81

Please sign in to comment.