diff --git a/assets/graphics/tiles_panel/tiles_auto.png b/assets/graphics/tiles_panel/tiles_auto.png new file mode 100644 index 000000000..f47997cc1 Binary files /dev/null and b/assets/graphics/tiles_panel/tiles_auto.png differ diff --git a/assets/graphics/tileset/place_tiles_enabled.png.import b/assets/graphics/tiles_panel/tiles_auto.png.import similarity index 65% rename from assets/graphics/tileset/place_tiles_enabled.png.import rename to assets/graphics/tiles_panel/tiles_auto.png.import index 694fdbf83..cccc38a46 100644 --- a/assets/graphics/tileset/place_tiles_enabled.png.import +++ b/assets/graphics/tiles_panel/tiles_auto.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://dga8nirhhgyc4" -path="res://.godot/imported/place_tiles_enabled.png-845e4dd5c3bbd38cc7bf5ee82ed05667.ctex" +uid="uid://7m4hln3mo2e5" +path="res://.godot/imported/tiles_auto.png-aa424acb8d9ccb5cfafcba826b056bb8.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/graphics/tileset/place_tiles_enabled.png" -dest_files=["res://.godot/imported/place_tiles_enabled.png-845e4dd5c3bbd38cc7bf5ee82ed05667.ctex"] +source_file="res://assets/graphics/tiles_panel/tiles_auto.png" +dest_files=["res://.godot/imported/tiles_auto.png-aa424acb8d9ccb5cfafcba826b056bb8.ctex"] [params] diff --git a/assets/graphics/tiles_panel/tiles_draw.png b/assets/graphics/tiles_panel/tiles_draw.png new file mode 100644 index 000000000..e4684ac2c Binary files /dev/null and b/assets/graphics/tiles_panel/tiles_draw.png differ diff --git a/assets/graphics/tileset/place_tiles_disabled.png.import b/assets/graphics/tiles_panel/tiles_draw.png.import similarity index 64% rename from assets/graphics/tileset/place_tiles_disabled.png.import rename to assets/graphics/tiles_panel/tiles_draw.png.import index 509a1aad5..85026d215 100644 --- a/assets/graphics/tileset/place_tiles_disabled.png.import +++ b/assets/graphics/tiles_panel/tiles_draw.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://bqr3n3tm8b6w2" -path="res://.godot/imported/place_tiles_disabled.png-f43e25b0863e3eedf3c6fc7ef902127f.ctex" +uid="uid://d4by47alul2qw" +path="res://.godot/imported/tiles_draw.png-2161bdef1f2df0ebc1822c447f728c76.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/graphics/tileset/place_tiles_disabled.png" -dest_files=["res://.godot/imported/place_tiles_disabled.png-f43e25b0863e3eedf3c6fc7ef902127f.ctex"] +source_file="res://assets/graphics/tiles_panel/tiles_draw.png" +dest_files=["res://.godot/imported/tiles_draw.png-2161bdef1f2df0ebc1822c447f728c76.ctex"] [params] diff --git a/assets/graphics/tiles_panel/tiles_manual.png b/assets/graphics/tiles_panel/tiles_manual.png new file mode 100644 index 000000000..f752f6ccd Binary files /dev/null and b/assets/graphics/tiles_panel/tiles_manual.png differ diff --git a/assets/graphics/tiles_panel/tiles_manual.png.import b/assets/graphics/tiles_panel/tiles_manual.png.import new file mode 100644 index 000000000..c2e432b42 --- /dev/null +++ b/assets/graphics/tiles_panel/tiles_manual.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dfq0wpxsd51co" +path="res://.godot/imported/tiles_manual.png-6c03d83d755d93fe4203be9b488842d7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/tiles_panel/tiles_manual.png" +dest_files=["res://.godot/imported/tiles_manual.png-6c03d83d755d93fe4203be9b488842d7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/tiles_panel/tiles_stack.png b/assets/graphics/tiles_panel/tiles_stack.png new file mode 100644 index 000000000..c10cc6730 Binary files /dev/null and b/assets/graphics/tiles_panel/tiles_stack.png differ diff --git a/assets/graphics/tiles_panel/tiles_stack.png.import b/assets/graphics/tiles_panel/tiles_stack.png.import new file mode 100644 index 000000000..bde31f77d --- /dev/null +++ b/assets/graphics/tiles_panel/tiles_stack.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://uo1ikty26del" +path="res://.godot/imported/tiles_stack.png-2dc663bcc395d8055dd966383581e31a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/tiles_panel/tiles_stack.png" +dest_files=["res://.godot/imported/tiles_stack.png-2dc663bcc395d8055dd966383581e31a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/tileset/place_tiles_disabled.png b/assets/graphics/tileset/place_tiles_disabled.png deleted file mode 100644 index efb1e2386..000000000 Binary files a/assets/graphics/tileset/place_tiles_disabled.png and /dev/null differ diff --git a/assets/graphics/tileset/place_tiles_enabled.png b/assets/graphics/tileset/place_tiles_enabled.png deleted file mode 100644 index ae61a09eb..000000000 Binary files a/assets/graphics/tileset/place_tiles_enabled.png and /dev/null differ diff --git a/src/UI/TilesPanel.gd b/src/UI/TilesPanel.gd index 26ac91534..34f3a66dc 100644 --- a/src/UI/TilesPanel.gd +++ b/src/UI/TilesPanel.gd @@ -172,10 +172,6 @@ func _on_place_tiles_toggled(toggled_on: bool) -> void: mode_buttons_container.visible = !placing_tiles for child: Button in transform_buttons_container.get_children(): Global.disable_button(child, not toggled_on) - if toggled_on: - Global.change_button_texturerect(place_tiles.get_child(0), "place_tiles_enabled.png") - else: - Global.change_button_texturerect(place_tiles.get_child(0), "place_tiles_disabled.png") update_tip() diff --git a/src/UI/TilesPanel.tscn b/src/UI/TilesPanel.tscn index 44440e3d5..e5522a51d 100644 --- a/src/UI/TilesPanel.tscn +++ b/src/UI/TilesPanel.tscn @@ -1,10 +1,13 @@ -[gd_scene load_steps=23 format=3 uid="uid://bfbragmmdwfbl"] +[gd_scene load_steps=26 format=3 uid="uid://bfbragmmdwfbl"] [ext_resource type="Script" path="res://src/UI/TilesPanel.gd" id="1_d2oc5"] -[ext_resource type="Texture2D" uid="uid://bqr3n3tm8b6w2" path="res://assets/graphics/tileset/place_tiles_disabled.png" id="2_pv2cd"] +[ext_resource type="Texture2D" uid="uid://d4by47alul2qw" path="res://assets/graphics/tiles_panel/tiles_draw.png" id="2_h0p0x"] [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"] +[ext_resource type="Texture2D" uid="uid://dfq0wpxsd51co" path="res://assets/graphics/tiles_panel/tiles_manual.png" id="6_gwj5u"] +[ext_resource type="Texture2D" uid="uid://7m4hln3mo2e5" path="res://assets/graphics/tiles_panel/tiles_auto.png" id="7_afsgi"] +[ext_resource type="Texture2D" uid="uid://uo1ikty26del" path="res://assets/graphics/tiles_panel/tiles_stack.png" id="8_yoaya"] [sub_resource type="InputEventAction" id="InputEventAction_klv67"] action = &"toggle_draw_tiles_mode" @@ -81,6 +84,7 @@ unique_name_in_owner = true custom_minimum_size = Vector2(25, 25) layout_mode = 2 size_flags_vertical = 0 +tooltip_text = "Draw tiles mode" mouse_default_cursor_shape = 2 toggle_mode = true shortcut = SubResource("Shortcut_6ebuw") @@ -92,9 +96,9 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -texture = ExtResource("2_pv2cd") +texture = ExtResource("2_h0p0x") expand_mode = 1 -stretch_mode = 5 +stretch_mode = 3 [node name="VSeparator" type="VSeparator" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons"] layout_mode = 2 @@ -179,27 +183,65 @@ unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 -[node name="Manual" type="CheckBox" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons/ModeButtonsContainer"] +[node name="Manual" type="Button" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons/ModeButtonsContainer" groups=["UIButtons"]] +custom_minimum_size = Vector2(24, 24) layout_mode = 2 +tooltip_text = "Manual" mouse_default_cursor_shape = 2 +toggle_mode = true button_group = SubResource("ButtonGroup_uxnt0") shortcut = SubResource("Shortcut_pgg48") -text = "Manual" -[node name="Auto" type="CheckBox" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons/ModeButtonsContainer"] +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons/ModeButtonsContainer/Manual"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("6_gwj5u") +expand_mode = 1 +stretch_mode = 3 + +[node name="Auto" type="Button" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons/ModeButtonsContainer" groups=["UIButtons"]] +custom_minimum_size = Vector2(24, 24) layout_mode = 2 +tooltip_text = "Auto" mouse_default_cursor_shape = 2 -button_pressed = true +toggle_mode = true button_group = SubResource("ButtonGroup_uxnt0") shortcut = SubResource("Shortcut_a0fx5") -text = "Auto" -[node name="Stack" type="CheckBox" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons/ModeButtonsContainer"] +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons/ModeButtonsContainer/Auto"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("7_afsgi") +expand_mode = 1 +stretch_mode = 3 + +[node name="Stack" type="Button" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons/ModeButtonsContainer" groups=["UIButtons"]] +custom_minimum_size = Vector2(24, 24) layout_mode = 2 +tooltip_text = "Stack" mouse_default_cursor_shape = 2 +toggle_mode = true button_group = SubResource("ButtonGroup_uxnt0") shortcut = SubResource("Shortcut_ysxej") -text = "Stack" + +[node name="TextureRect" type="TextureRect" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons/ModeButtonsContainer/Stack"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("8_yoaya") +expand_mode = 1 +stretch_mode = 3 [node name="HSeparator" type="HSeparator" parent="VBoxContainer/MarginContainer/VBoxContainer"] layout_mode = 2