mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 06:54:43 -04:00
Changed tool TextureButtons into Buttons
This commit is contained in:
parent
0ebc7a6033
commit
415db39e64
143 changed files with 1654 additions and 2954 deletions
12
src/Main.gd
12
src/Main.gd
|
@ -604,14 +604,18 @@ func _on_Tool_pressed(tool_pressed : BaseButton, mouse_press := true, key_for_le
|
|||
|
||||
for t in tools:
|
||||
var tool_name : String = t[0].name
|
||||
var theme_type := Global.theme_type
|
||||
if theme_type == "Gold":
|
||||
theme_type = "Dark"
|
||||
|
||||
if tool_name == Global.current_left_tool and tool_name == Global.current_right_tool:
|
||||
t[0].texture_normal = load("res://Assets/Graphics/%s_themes/tools/%s_l_r.png" % [Global.theme_type.to_lower(), tool_name.to_lower()])
|
||||
t[0].get_child(0).texture = load("res://Assets/Graphics/%s_themes/tools/%s_l_r.png" % [theme_type.to_lower(), tool_name.to_lower()])
|
||||
elif tool_name == Global.current_left_tool:
|
||||
t[0].texture_normal = load("res://Assets/Graphics/%s_themes/tools/%s_l.png" % [Global.theme_type.to_lower(), tool_name.to_lower()])
|
||||
t[0].get_child(0).texture = load("res://Assets/Graphics/%s_themes/tools/%s_l.png" % [theme_type.to_lower(), tool_name.to_lower()])
|
||||
elif tool_name == Global.current_right_tool:
|
||||
t[0].texture_normal = load("res://Assets/Graphics/%s_themes/tools/%s_r.png" % [Global.theme_type.to_lower(), tool_name.to_lower()])
|
||||
t[0].get_child(0).texture = load("res://Assets/Graphics/%s_themes/tools/%s_r.png" % [theme_type.to_lower(), tool_name.to_lower()])
|
||||
else:
|
||||
t[0].texture_normal = load("res://Assets/Graphics/%s_themes/tools/%s.png" % [Global.theme_type.to_lower(), tool_name.to_lower()])
|
||||
t[0].get_child(0).texture = load("res://Assets/Graphics/%s_themes/tools/%s.png" % [theme_type.to_lower(), tool_name.to_lower()])
|
||||
|
||||
Global.left_cursor_tool_texture.create_from_image(load("res://Assets/Graphics/cursor_icons/%s_cursor.png" % Global.current_left_tool.to_lower()), 0)
|
||||
Global.right_cursor_tool_texture.create_from_image(load("res://Assets/Graphics/cursor_icons/%s_cursor.png" % Global.current_right_tool.to_lower()), 0)
|
||||
|
|
|
@ -229,74 +229,130 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="RectSelect" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
[node name="RectSelect" type="Button" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
mouse_default_cursor_shape = 2
|
||||
button_mask = 3
|
||||
texture_normal = ExtResource( 4 )
|
||||
|
||||
[node name="Zoom" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
[node name="TextureRect" type="TextureRect" parent="MenuAndUI/UI/ToolPanel/Tools/RectSelect"]
|
||||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
texture = ExtResource( 4 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Zoom" type="Button" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_top = 36.0
|
||||
margin_right = 32.0
|
||||
margin_bottom = 68.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
mouse_default_cursor_shape = 2
|
||||
button_mask = 3
|
||||
texture_normal = ExtResource( 23 )
|
||||
|
||||
[node name="ColorPicker" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
[node name="TextureRect" type="TextureRect" parent="MenuAndUI/UI/ToolPanel/Tools/Zoom"]
|
||||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
texture = ExtResource( 23 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ColorPicker" type="Button" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_top = 72.0
|
||||
margin_right = 32.0
|
||||
margin_bottom = 104.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
mouse_default_cursor_shape = 2
|
||||
button_mask = 3
|
||||
texture_normal = ExtResource( 8 )
|
||||
|
||||
[node name="Pencil" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
[node name="TextureRect" type="TextureRect" parent="MenuAndUI/UI/ToolPanel/Tools/ColorPicker"]
|
||||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
texture = ExtResource( 8 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Pencil" type="Button" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_top = 108.0
|
||||
margin_right = 32.0
|
||||
margin_bottom = 140.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
mouse_default_cursor_shape = 2
|
||||
button_mask = 3
|
||||
texture_normal = ExtResource( 6 )
|
||||
|
||||
[node name="Eraser" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
[node name="TextureRect" type="TextureRect" parent="MenuAndUI/UI/ToolPanel/Tools/Pencil"]
|
||||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
texture = ExtResource( 6 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Eraser" type="Button" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_top = 144.0
|
||||
margin_right = 32.0
|
||||
margin_bottom = 176.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
mouse_default_cursor_shape = 2
|
||||
button_mask = 3
|
||||
texture_normal = ExtResource( 5 )
|
||||
|
||||
[node name="Bucket" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
[node name="TextureRect" type="TextureRect" parent="MenuAndUI/UI/ToolPanel/Tools/Eraser"]
|
||||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
texture = ExtResource( 5 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Bucket" type="Button" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_top = 180.0
|
||||
margin_right = 32.0
|
||||
margin_bottom = 212.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
mouse_default_cursor_shape = 2
|
||||
button_mask = 3
|
||||
texture_normal = ExtResource( 9 )
|
||||
|
||||
[node name="LightenDarken" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
[node name="TextureRect" type="TextureRect" parent="MenuAndUI/UI/ToolPanel/Tools/Bucket"]
|
||||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
texture = ExtResource( 9 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="LightenDarken" type="Button" parent="MenuAndUI/UI/ToolPanel/Tools" groups=[
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_top = 216.0
|
||||
margin_right = 32.0
|
||||
margin_bottom = 248.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
mouse_default_cursor_shape = 2
|
||||
button_mask = 3
|
||||
texture_normal = ExtResource( 7 )
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MenuAndUI/UI/ToolPanel/Tools/LightenDarken"]
|
||||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
texture = ExtResource( 7 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CanvasAndTimeline" type="VSplitContainer" parent="MenuAndUI/UI"]
|
||||
margin_left = 48.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue