1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Add icons to the tool panel buttons

This commit is contained in:
Emmanouil Papadeas 2025-01-22 21:27:45 +02:00
parent 9155d79777
commit fbadf41f82
12 changed files with 129 additions and 23 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

View file

@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://dga8nirhhgyc4" uid="uid://7m4hln3mo2e5"
path="res://.godot/imported/place_tiles_enabled.png-845e4dd5c3bbd38cc7bf5ee82ed05667.ctex" path="res://.godot/imported/tiles_auto.png-aa424acb8d9ccb5cfafcba826b056bb8.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://assets/graphics/tileset/place_tiles_enabled.png" source_file="res://assets/graphics/tiles_panel/tiles_auto.png"
dest_files=["res://.godot/imported/place_tiles_enabled.png-845e4dd5c3bbd38cc7bf5ee82ed05667.ctex"] dest_files=["res://.godot/imported/tiles_auto.png-aa424acb8d9ccb5cfafcba826b056bb8.ctex"]
[params] [params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

View file

@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://bqr3n3tm8b6w2" uid="uid://d4by47alul2qw"
path="res://.godot/imported/place_tiles_disabled.png-f43e25b0863e3eedf3c6fc7ef902127f.ctex" path="res://.godot/imported/tiles_draw.png-2161bdef1f2df0ebc1822c447f728c76.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://assets/graphics/tileset/place_tiles_disabled.png" source_file="res://assets/graphics/tiles_panel/tiles_draw.png"
dest_files=["res://.godot/imported/place_tiles_disabled.png-f43e25b0863e3eedf3c6fc7ef902127f.ctex"] dest_files=["res://.godot/imported/tiles_draw.png-2161bdef1f2df0ebc1822c447f728c76.ctex"]
[params] [params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

View file

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

View file

@ -172,10 +172,6 @@ func _on_place_tiles_toggled(toggled_on: bool) -> void:
mode_buttons_container.visible = !placing_tiles mode_buttons_container.visible = !placing_tiles
for child: Button in transform_buttons_container.get_children(): for child: Button in transform_buttons_container.get_children():
Global.disable_button(child, not toggled_on) 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() update_tip()

View file

@ -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="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://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://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://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"] [sub_resource type="InputEventAction" id="InputEventAction_klv67"]
action = &"toggle_draw_tiles_mode" action = &"toggle_draw_tiles_mode"
@ -81,6 +84,7 @@ unique_name_in_owner = true
custom_minimum_size = Vector2(25, 25) custom_minimum_size = Vector2(25, 25)
layout_mode = 2 layout_mode = 2
size_flags_vertical = 0 size_flags_vertical = 0
tooltip_text = "Draw tiles mode"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
toggle_mode = true toggle_mode = true
shortcut = SubResource("Shortcut_6ebuw") shortcut = SubResource("Shortcut_6ebuw")
@ -92,9 +96,9 @@ anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
texture = ExtResource("2_pv2cd") texture = ExtResource("2_h0p0x")
expand_mode = 1 expand_mode = 1
stretch_mode = 5 stretch_mode = 3
[node name="VSeparator" type="VSeparator" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons"] [node name="VSeparator" type="VSeparator" parent="VBoxContainer/MarginContainer/VBoxContainer/Buttons"]
layout_mode = 2 layout_mode = 2
@ -179,27 +183,65 @@ unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 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 layout_mode = 2
tooltip_text = "Manual"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
toggle_mode = true
button_group = SubResource("ButtonGroup_uxnt0") button_group = SubResource("ButtonGroup_uxnt0")
shortcut = SubResource("Shortcut_pgg48") 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 layout_mode = 2
tooltip_text = "Auto"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
button_pressed = true toggle_mode = true
button_group = SubResource("ButtonGroup_uxnt0") button_group = SubResource("ButtonGroup_uxnt0")
shortcut = SubResource("Shortcut_a0fx5") 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 layout_mode = 2
tooltip_text = "Stack"
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
toggle_mode = true
button_group = SubResource("ButtonGroup_uxnt0") button_group = SubResource("ButtonGroup_uxnt0")
shortcut = SubResource("Shortcut_ysxej") 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"] [node name="HSeparator" type="HSeparator" parent="VBoxContainer/MarginContainer/VBoxContainer"]
layout_mode = 2 layout_mode = 2