From add9ba926e76835033cd940560b154591c1ccd39 Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Mon, 21 Feb 2022 18:02:02 +0200 Subject: [PATCH] Remove pre-set tool button nodes, tool setup now being done only in the Tools singleton Now when making a new tool we only have to set it up in Tools.gd, along with its button and cursor textures and its tool options scene. Previously, we also had to put it in ToolButtons.gd and manually create a button in Tools.tscn --- Translations/Translations.pot | 8 +- src/Autoload/Global.gd | 3 +- src/Autoload/Tools.gd | 149 ++++- src/Tools/ToolButton.tscn | 66 ++ src/UI/ToolButtons.gd | 49 +- src/UI/Tools.tscn | 1063 +-------------------------------- 6 files changed, 208 insertions(+), 1130 deletions(-) create mode 100644 src/Tools/ToolButton.tscn diff --git a/Translations/Translations.pot b/Translations/Translations.pot index 9b21ee242..890a0ad7a 100644 --- a/Translations/Translations.pot +++ b/Translations/Translations.pot @@ -809,9 +809,9 @@ msgid "Elliptical Selection\n\n" msgstr "" msgid "Polygonal Selection\n" -"Double-click to connect the last point to the starting point\n\n" "%s for left mouse button\n" -"%s for right mouse button" +"%s for right mouse button\n\n" +"Double-click to connect the last point to the starting point" msgstr "" msgid "Select By Color\n\n" @@ -845,9 +845,9 @@ msgid "Pan\n\n" msgstr "" msgid "Color Picker\n" -"Select a color from a pixel of the sprite\n\n" "%s for left mouse button\n" -"%s for right mouse button" +"%s for right mouse button\n\n" +"Select a color from a pixel of the sprite" msgstr "" msgid "Pencil\n\n" diff --git a/src/Autoload/Global.gd b/src/Autoload/Global.gd index 1d1a70049..afb2d02f0 100644 --- a/src/Autoload/Global.gd +++ b/src/Autoload/Global.gd @@ -323,8 +323,7 @@ func change_button_texturerect(texture_button: TextureRect, new_file_name: Strin func update_hint_tooltips() -> void: - var tool_buttons: Container = control.find_node("ToolButtons") - tool_buttons.update_hintooltips() + Tools.update_hint_tooltips() for tip in ui_tooltips: tip.hint_tooltip = tr(ui_tooltips[tip]) % tip.shortcut.get_as_text() diff --git a/src/Autoload/Tools.gd b/src/Autoload/Tools.gd index 6f2a769c7..02f1c1f45 100644 --- a/src/Autoload/Tools.gd +++ b/src/Autoload/Tools.gd @@ -9,32 +9,118 @@ var control := false var shift := false var alt := false -var _tools = { - "RectSelect": preload("res://src/Tools/SelectionTools/RectSelect.tscn"), - "EllipseSelect": preload("res://src/Tools/SelectionTools/EllipseSelect.tscn"), - "PolygonSelect": preload("res://src/Tools/SelectionTools/PolygonSelect.tscn"), - "ColorSelect": preload("res://src/Tools/SelectionTools/ColorSelect.tscn"), - "MagicWand": preload("res://src/Tools/SelectionTools/MagicWand.tscn"), - "Lasso": preload("res://src/Tools/SelectionTools/Lasso.tscn"), - "Move": preload("res://src/Tools/Move.tscn"), - "Zoom": preload("res://src/Tools/Zoom.tscn"), - "Pan": preload("res://src/Tools/Pan.tscn"), - "ColorPicker": preload("res://src/Tools/ColorPicker.tscn"), - "Pencil": preload("res://src/Tools/Pencil.tscn"), - "Eraser": preload("res://src/Tools/Eraser.tscn"), - "Bucket": preload("res://src/Tools/Bucket.tscn"), - "Shading": preload("res://src/Tools/Shading.tscn"), - "LineTool": preload("res://src/Tools/LineTool.tscn"), - "RectangleTool": preload("res://src/Tools/RectangleTool.tscn"), - "EllipseTool": preload("res://src/Tools/EllipseTool.tscn"), +var tools := { + "RectSelect": + Tool.new("RectSelect", "Rectangular Selection", "rectangle_select", "", [], "SelectionTools"), + "EllipseSelect": + Tool.new("EllipseSelect", "Elliptical Selection", "ellipse_select", "", [], "SelectionTools"), + "PolygonSelect": + Tool.new( + "PolygonSelect", + "Polygonal Selection", + "polygon_select", + "Double-click to connect the last point to the starting point", + [], + "SelectionTools" + ), + "ColorSelect": + Tool.new("ColorSelect", "Select By Color", "color_select", "", [], "SelectionTools"), + "MagicWand": Tool.new("MagicWand", "Magic Wand", "magic_wand", "", [], "SelectionTools"), + "Lasso": Tool.new("Lasso", "Lasso / Free Select Tool", "lasso", "", [], "SelectionTools"), + "Move": Tool.new("Move", "Move", "move"), + "Zoom": Tool.new("Zoom", "Zoom", "zoom"), + "Pan": Tool.new("Pan", "Pan", "pan"), + "ColorPicker": + Tool.new( + "ColorPicker", "Color Picker", "colorpicker", "Select a color from a pixel of the sprite" + ), + "Pencil": Tool.new("Pencil", "Pencil", "pencil", "Hold %s to make a line", ["Shift"]), + "Eraser": Tool.new("Eraser", "Eraser", "eraser", "Hold %s to make a line", ["Shift"]), + "Bucket": Tool.new("Bucket", "Bucket", "fill"), + "Shading": Tool.new("Shading", "Shading Tool", "shading"), + "LineTool": + Tool.new( + "LineTool", + "Line Tool", + "linetool", + """Hold %s to snap the angle of the line +Hold %s to center the shape on the click origin +Hold %s to displace the shape's origin""", + ["Shift", "Ctrl", "Alt"] + ), + "RectangleTool": + Tool.new( + "RectangleTool", + "Rectangle Tool", + "rectangletool", + """Hold %s to create a 1:1 shape +Hold %s to center the shape on the click origin +Hold %s to displace the shape's origin""", + ["Shift", "Ctrl", "Alt"] + ), + "EllipseTool": + Tool.new( + "EllipseTool", + "Ellipse Tool", + "ellipsetool", + """Hold %s to create a 1:1 shape +Hold %s to center the shape on the click origin +Hold %s to displace the shape's origin""", + ["Shift", "Ctrl", "Alt"] + ), } -var _slots = {} -var _panels = {} + +var _tool_button_scene: PackedScene = preload("res://src/Tools/ToolButton.tscn") +var _slots := {} +var _panels := {} var _tool_buttons: Node var _active_button := -1 var _last_position := Vector2.INF +class Tool: + var name := "" + var display_name := "" + var scene: PackedScene + var icon: Texture + var shortcut := "" + var extra_hint := "" + var extra_shortcuts := [] # Array of String(s) + var button_node: BaseButton + + func _init( + _name: String, + _display_name: String, + _shortcut: String, + _extra_hint := "", + _extra_shortucts := [], + subdir := "" + ) -> void: + name = _name + display_name = _display_name + shortcut = _shortcut + extra_hint = _extra_hint + extra_shortcuts = _extra_shortucts + icon = load("res://assets/graphics/tools/%s.png" % name.to_lower()) + if subdir.empty(): + scene = load("res://src/Tools/%s.tscn" % name) + else: + scene = load("res://src/Tools/%s/%s.tscn" % [subdir, name]) + + func generate_hint_tooltip() -> String: + var left_shortcut: String = InputMap.get_action_list("left_" + shortcut + "_tool")[0].as_text() + var right_shortcut: String = InputMap.get_action_list("right_" + shortcut + "_tool")[0].as_text() + var hint := display_name + hint += "\n\n%s for left mouse button\n%s for right mouse button" + if !extra_hint.empty(): + hint += "\n\n" + extra_hint + + var shortcuts := [left_shortcut, right_shortcut] + shortcuts.append_array(extra_shortcuts) + hint = tr(hint) % shortcuts + return hint + + class Slot: var name: String var kname: String @@ -62,6 +148,8 @@ class Slot: func _ready() -> void: _tool_buttons = Global.control.find_node("ToolButtons") + for t in tools: + add_tool_button(tools[t]) _slots[BUTTON_LEFT] = Slot.new("Left tool") _slots[BUTTON_RIGHT] = Slot.new("Right tool") _panels[BUTTON_LEFT] = Global.control.find_node("LeftPanelContainer", true, false) @@ -70,11 +158,11 @@ func _ready() -> void: var tool_name: String = Global.config_cache.get_value( _slots[BUTTON_LEFT].kname, "tool", "Pencil" ) - if not tool_name in _tools: + if not tool_name in tools: tool_name = "Pencil" set_tool(tool_name, BUTTON_LEFT) tool_name = Global.config_cache.get_value(_slots[BUTTON_RIGHT].kname, "tool", "Eraser") - if not tool_name in _tools: + if not tool_name in tools: tool_name = "Eraser" set_tool(tool_name, BUTTON_RIGHT) @@ -94,10 +182,19 @@ func _ready() -> void: assign_color(color_value, BUTTON_RIGHT, false) +func add_tool_button(t: Tool) -> void: + var tool_button: BaseButton = _tool_button_scene.instance() + tool_button.name = t.name + tool_button.get_node("ToolIcon").texture = t.icon + t.button_node = tool_button + _tool_buttons.add_child(tool_button) + tool_button.connect("pressed", _tool_buttons, "_on_Tool_pressed", [tool_button]) + + func set_tool(name: String, button: int) -> void: var slot = _slots[button] var panel: Node = _panels[button] - var node: Node = _tools[name].instance() + var node: Node = tools[name].scene.instance() if button == BUTTON_LEFT: # As guides are only moved with left mouse if name == "Pan": # tool you want to give more access at guides Global.move_guides_on_canvas = true @@ -176,6 +273,12 @@ func update_tool_buttons() -> void: right_background.visible = _slots[BUTTON_RIGHT].tool_node.name == child.name +func update_hint_tooltips() -> void: + for tool_name in tools: + var t: Tool = tools[tool_name] + t.button_node.hint_tooltip = t.generate_hint_tooltip() + + func update_tool_cursors() -> void: var left_image = load( "res://assets/graphics/tools/cursors/%s.png" % _slots[BUTTON_LEFT].tool_node.name.to_lower() diff --git a/src/Tools/ToolButton.tscn b/src/Tools/ToolButton.tscn new file mode 100644 index 000000000..b448a2065 --- /dev/null +++ b/src/Tools/ToolButton.tscn @@ -0,0 +1,66 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://assets/graphics/tools/tool_background.png" type="Texture" id=1] +[ext_resource path="res://assets/graphics/tools/rectselect.png" type="Texture" id=2] + +[node name="Tool" type="Button" groups=["UIButtons"]] +margin_right = 24.0 +margin_bottom = 24.0 +rect_min_size = Vector2( 24, 24 ) +hint_tooltip = "Rectangular Selection + +%s for left mouse button +%s for right mouse button" +mouse_default_cursor_shape = 2 +button_mask = 3 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="BackgroundLeft" type="NinePatchRect" parent="."] +visible = false +modulate = Color( 0, 0.52549, 0.811765, 1 ) +anchor_bottom = 1.0 +margin_right = 12.0 +texture = ExtResource( 1 ) +region_rect = Rect2( 0, 0, 11, 24 ) +patch_margin_left = 2 +patch_margin_top = 1 +patch_margin_right = 10 +patch_margin_bottom = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="BackgroundRight" type="NinePatchRect" parent="."] +visible = false +modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) +anchor_bottom = 1.0 +margin_left = 24.0 +margin_top = 24.0 +margin_right = 36.0 +margin_bottom = 24.0 +rect_rotation = 180.0 +texture = ExtResource( 1 ) +region_rect = Rect2( 0, 0, 11, 24 ) +patch_margin_left = 2 +patch_margin_top = 1 +patch_margin_right = 10 +patch_margin_bottom = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ToolIcon" type="TextureRect" parent="."] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -11.0 +margin_top = -11.0 +margin_right = 11.0 +margin_bottom = 11.0 +texture = ExtResource( 2 ) +__meta__ = { +"_edit_use_anchors_": false +} diff --git a/src/UI/ToolButtons.gd b/src/UI/ToolButtons.gd index a3a602cdc..ff96f368e 100644 --- a/src/UI/ToolButtons.gd +++ b/src/UI/ToolButtons.gd @@ -1,49 +1,11 @@ extends GridContainer -var tooltips := [] - -# Node, shortcut -onready var tools := [ - [$RectSelect, "rectangle_select"], - [$EllipseSelect, "ellipse_select"], - [$PolygonSelect, "polygon_select"], - [$ColorSelect, "color_select"], - [$MagicWand, "magic_wand"], - [$Lasso, "lasso"], - [$Move, "move"], - [$Zoom, "zoom"], - [$Pan, "pan"], - [$ColorPicker, "colorpicker"], - [$Pencil, "pencil", "Shift"], - [$Eraser, "eraser", "Shift"], - [$Bucket, "fill"], - [$Shading, "shading"], - [$LineTool, "linetool", "Shift", "Ctrl", "Alt"], - [$RectangleTool, "rectangletool", "Shift", "Ctrl", "Alt"], - [$EllipseTool, "ellipsetool", "Shift", "Ctrl", "Alt"], -] - func _ready() -> void: - for t in tools: - t[0].connect("pressed", self, "_on_Tool_pressed", [t[0]]) - tooltips.append(t[0].hint_tooltip) - # Resize tools panel when window gets resized get_tree().get_root().connect("size_changed", self, "_on_Tools_resized") -func update_hintooltips() -> void: - for i in tools.size(): - var toolname: String = tools[i][1] - var shortcuts := [] - shortcuts.append(InputMap.get_action_list("left_" + toolname + "_tool")[0].as_text()) - shortcuts.append(InputMap.get_action_list("right_" + toolname + "_tool")[0].as_text()) - for j in range(2, tools[i].size()): - shortcuts.append(tools[i][j]) - tools[i][0].hint_tooltip = tr(tooltips[i]) % shortcuts - - func _input(event: InputEvent) -> void: if not Global.has_focus or not event is InputEventKey: return @@ -51,13 +13,14 @@ func _input(event: InputEvent) -> void: if event.is_action_pressed(action): return - for t in tools: # Handle tool shortcuts - if event.is_action_pressed("right_" + t[1] + "_tool") and !event.control: + for tool_name in Tools.tools: # Handle tool shortcuts + var t: Tools.Tool = Tools.tools[tool_name] + if event.is_action_pressed("right_" + t.shortcut + "_tool") and !event.control: # Shortcut for right button (with Alt) - Tools.assign_tool(t[0].name, BUTTON_RIGHT) - elif event.is_action_pressed("left_" + t[1] + "_tool") and !event.control: + Tools.assign_tool(t.name, BUTTON_RIGHT) + elif event.is_action_pressed("left_" + t.shortcut + "_tool") and !event.control: # Shortcut for left button - Tools.assign_tool(t[0].name, BUTTON_LEFT) + Tools.assign_tool(t.name, BUTTON_LEFT) func _on_Tool_pressed(tool_pressed: BaseButton) -> void: diff --git a/src/UI/Tools.tscn b/src/UI/Tools.tscn index 493d001e7..7ac1224ca 100644 --- a/src/UI/Tools.tscn +++ b/src/UI/Tools.tscn @@ -1,24 +1,6 @@ -[gd_scene load_steps=20 format=2] +[gd_scene load_steps=2 format=2] -[ext_resource path="res://assets/graphics/tools/linetool.png" type="Texture" id=1] -[ext_resource path="res://assets/graphics/tools/shading.png" type="Texture" id=2] [ext_resource path="res://src/UI/ToolButtons.gd" type="Script" id=3] -[ext_resource path="res://assets/graphics/tools/colorpicker.png" type="Texture" id=4] -[ext_resource path="res://assets/graphics/tools/lasso.png" type="Texture" id=5] -[ext_resource path="res://assets/graphics/tools/rectangletool.png" type="Texture" id=6] -[ext_resource path="res://assets/graphics/tools/ellipseselect.png" type="Texture" id=7] -[ext_resource path="res://assets/graphics/tools/bucket.png" type="Texture" id=8] -[ext_resource path="res://assets/graphics/tools/ellipsetool.png" type="Texture" id=9] -[ext_resource path="res://assets/graphics/tools/pencil.png" type="Texture" id=10] -[ext_resource path="res://assets/graphics/tools/colorselect.png" type="Texture" id=11] -[ext_resource path="res://assets/graphics/tools/pan.png" type="Texture" id=12] -[ext_resource path="res://assets/graphics/tools/rectselect.png" type="Texture" id=13] -[ext_resource path="res://assets/graphics/tools/move.png" type="Texture" id=14] -[ext_resource path="res://assets/graphics/tools/polygonselect.png" type="Texture" id=15] -[ext_resource path="res://assets/graphics/tools/magicwand.png" type="Texture" id=16] -[ext_resource path="res://assets/graphics/tools/eraser.png" type="Texture" id=17] -[ext_resource path="res://assets/graphics/tools/zoom.png" type="Texture" id=18] -[ext_resource path="res://assets/graphics/tools/tool_background.png" type="Texture" id=19] [node name="Tools" type="ScrollContainer"] anchor_right = 1.0 @@ -33,8 +15,8 @@ __meta__ = { } [node name="PanelContainer" type="PanelContainer" parent="."] -margin_right = 38.0 -margin_bottom = 486.0 +margin_right = 14.0 +margin_bottom = 14.0 size_flags_horizontal = 0 size_flags_vertical = 0 __meta__ = { @@ -44,1045 +26,10 @@ __meta__ = { [node name="ToolButtons" type="GridContainer" parent="PanelContainer"] margin_left = 7.0 margin_top = 7.0 -margin_right = 31.0 -margin_bottom = 479.0 +margin_right = 7.0 +margin_bottom = 7.0 size_flags_horizontal = 0 size_flags_vertical = 0 script = ExtResource( 3 ) -[node name="RectSelect" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_right = 24.0 -margin_bottom = 24.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Rectangular Selection - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/RectSelect"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/RectSelect"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/RectSelect"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 13 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="EllipseSelect" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 28.0 -margin_right = 24.0 -margin_bottom = 52.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Elliptical Selection - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/EllipseSelect"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/EllipseSelect"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/EllipseSelect"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 7 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="PolygonSelect" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 56.0 -margin_right = 24.0 -margin_bottom = 80.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Polygonal Selection -Double-click to connect the last point to the starting point - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/PolygonSelect"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/PolygonSelect"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/PolygonSelect"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 15 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ColorSelect" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 84.0 -margin_right = 24.0 -margin_bottom = 108.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Select By Color - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/ColorSelect"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/ColorSelect"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/ColorSelect"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 11 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="MagicWand" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 112.0 -margin_right = 24.0 -margin_bottom = 136.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Magic Wand - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/MagicWand"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/MagicWand"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/MagicWand"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 16 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Lasso" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 140.0 -margin_right = 24.0 -margin_bottom = 164.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Lasso / Free Select Tool - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/Lasso"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/Lasso"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/Lasso"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 5 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Move" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 168.0 -margin_right = 24.0 -margin_bottom = 192.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Move - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/Move"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/Move"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/Move"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 14 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Zoom" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 196.0 -margin_right = 24.0 -margin_bottom = 220.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Zoom - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/Zoom"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/Zoom"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/Zoom"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 18 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Pan" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 224.0 -margin_right = 24.0 -margin_bottom = 248.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Pan - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/Pan"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/Pan"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/Pan"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 12 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ColorPicker" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 252.0 -margin_right = 24.0 -margin_bottom = 276.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Color Picker -Select a color from a pixel of the sprite - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/ColorPicker"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/ColorPicker"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/ColorPicker"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 4 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Pencil" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 280.0 -margin_right = 24.0 -margin_bottom = 304.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Pencil - -%s for left mouse button -%s for right mouse button - -Hold %s to make a line" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/Pencil"] -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/Pencil"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/Pencil"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 10 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Eraser" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 308.0 -margin_right = 24.0 -margin_bottom = 332.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Eraser - -%s for left mouse button -%s for right mouse button - -Hold %s to make a line" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/Eraser"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/Eraser"] -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/Eraser"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 17 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Bucket" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 336.0 -margin_right = 24.0 -margin_bottom = 360.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Bucket - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/Bucket"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/Bucket"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/Bucket"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 8 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Shading" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 364.0 -margin_right = 24.0 -margin_bottom = 388.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Shading Tool - -%s for left mouse button -%s for right mouse button" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/Shading"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/Shading"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/Shading"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 2 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="LineTool" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 392.0 -margin_right = 24.0 -margin_bottom = 416.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Line Tool - -%s for left mouse button -%s for right mouse button - -Hold %s to snap the angle of the line -Hold %s to center the shape on the click origin -Hold %s to displace the shape's origin" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/LineTool"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/LineTool"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/LineTool"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="RectangleTool" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 420.0 -margin_right = 24.0 -margin_bottom = 444.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Rectangle Tool - -%s for left mouse button -%s for right mouse button - -Hold %s to create a 1:1 shape -Hold %s to center the shape on the click origin -Hold %s to displace the shape's origin" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/RectangleTool"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/RectangleTool"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/RectangleTool"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 6 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="EllipseTool" type="Button" parent="PanelContainer/ToolButtons" groups=["UIButtons"]] -margin_top = 448.0 -margin_right = 24.0 -margin_bottom = 472.0 -rect_min_size = Vector2( 24, 24 ) -hint_tooltip = "Ellipse Tool - -%s for left mouse button -%s for right mouse button - -Hold %s to create a 1:1 shape -Hold %s to center the shape on the click origin -Hold %s to displace the shape's origin" -mouse_default_cursor_shape = 2 -button_mask = 3 - -[node name="BackgroundLeft" type="NinePatchRect" parent="PanelContainer/ToolButtons/EllipseTool"] -visible = false -modulate = Color( 0, 0.52549, 0.811765, 1 ) -anchor_bottom = 1.0 -margin_right = 12.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="BackgroundRight" type="NinePatchRect" parent="PanelContainer/ToolButtons/EllipseTool"] -visible = false -modulate = Color( 0.992157, 0.427451, 0.0784314, 1 ) -anchor_bottom = 1.0 -margin_left = 24.0 -margin_top = 24.0 -margin_right = 36.0 -margin_bottom = 24.0 -rect_rotation = 180.0 -texture = ExtResource( 19 ) -region_rect = Rect2( 0, 0, 11, 24 ) -patch_margin_left = 2 -patch_margin_top = 1 -patch_margin_right = 10 -patch_margin_bottom = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ToolIcon" type="TextureRect" parent="PanelContainer/ToolButtons/EllipseTool"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -11.0 -margin_top = -11.0 -margin_right = 11.0 -margin_bottom = 11.0 -texture = ExtResource( 9 ) -__meta__ = { -"_edit_use_anchors_": false -} - [connection signal="resized" from="." to="PanelContainer/ToolButtons" method="_on_Tools_resized"]