diff --git a/Assets/Graphics/Tools/ColorPicker.png b/Assets/Graphics/Tools/ColorPicker.png new file mode 100644 index 000000000..23875660d Binary files /dev/null and b/Assets/Graphics/Tools/ColorPicker.png differ diff --git a/Assets/Graphics/Tools/ColorPicker.png.import b/Assets/Graphics/Tools/ColorPicker.png.import new file mode 100644 index 000000000..77a6058d8 --- /dev/null +++ b/Assets/Graphics/Tools/ColorPicker.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/ColorPicker.png-c3ca53305589accba5ce5f684a7ab345.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Tools/ColorPicker.png" +dest_files=[ "res://.import/ColorPicker.png-c3ca53305589accba5ce5f684a7ab345.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Tools/ColorPicker_l.png b/Assets/Graphics/Tools/ColorPicker_l.png new file mode 100644 index 000000000..1eabc0286 Binary files /dev/null and b/Assets/Graphics/Tools/ColorPicker_l.png differ diff --git a/Assets/Graphics/Tools/ColorPicker_l.png.import b/Assets/Graphics/Tools/ColorPicker_l.png.import new file mode 100644 index 000000000..4e1a93650 --- /dev/null +++ b/Assets/Graphics/Tools/ColorPicker_l.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/ColorPicker_l.png-8a68f2236cfcbcecfe3f91ca1bc027a1.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Tools/ColorPicker_l.png" +dest_files=[ "res://.import/ColorPicker_l.png-8a68f2236cfcbcecfe3f91ca1bc027a1.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Tools/ColorPicker_l_r.png b/Assets/Graphics/Tools/ColorPicker_l_r.png new file mode 100644 index 000000000..1816c9ba9 Binary files /dev/null and b/Assets/Graphics/Tools/ColorPicker_l_r.png differ diff --git a/Assets/Graphics/Tools/ColorPicker_l_r.png.import b/Assets/Graphics/Tools/ColorPicker_l_r.png.import new file mode 100644 index 000000000..c01c97a81 --- /dev/null +++ b/Assets/Graphics/Tools/ColorPicker_l_r.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/ColorPicker_l_r.png-d16830502b90c9ebef38d0bb458b79cf.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Tools/ColorPicker_l_r.png" +dest_files=[ "res://.import/ColorPicker_l_r.png-d16830502b90c9ebef38d0bb458b79cf.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Assets/Graphics/Tools/ColorPicker_r.png b/Assets/Graphics/Tools/ColorPicker_r.png new file mode 100644 index 000000000..211f729ce Binary files /dev/null and b/Assets/Graphics/Tools/ColorPicker_r.png differ diff --git a/Assets/Graphics/Tools/ColorPicker_r.png.import b/Assets/Graphics/Tools/ColorPicker_r.png.import new file mode 100644 index 000000000..03a2dacba --- /dev/null +++ b/Assets/Graphics/Tools/ColorPicker_r.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/ColorPicker_r.png-b9994f86e90de44cb5a260d722d49559.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Graphics/Tools/ColorPicker_r.png" +dest_files=[ "res://.import/ColorPicker_r.png-b9994f86e90de44cb5a260d722d49559.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Main.tscn b/Main.tscn index 2829edfc6..537ab007f 100644 --- a/Main.tscn +++ b/Main.tscn @@ -1,45 +1,46 @@ -[gd_scene load_steps=46 format=2] +[gd_scene load_steps=47 format=2] [ext_resource path="res://Scripts/Main.gd" type="Script" id=1] [ext_resource path="res://Assets/Graphics/Tools/RectSelect.png" type="Texture" id=2] -[ext_resource path="res://Assets/Graphics/Tools/Pencil_l.png" type="Texture" id=3] -[ext_resource path="res://Assets/Graphics/Tools/Eraser_r.png" type="Texture" id=4] -[ext_resource path="res://Assets/Graphics/Tools/Bucket.png" type="Texture" id=5] -[ext_resource path="res://Assets/Graphics/Tools/LightenDarken.png" type="Texture" id=6] -[ext_resource path="res://Assets/Graphics/Color switch.png" type="Texture" id=7] -[ext_resource path="res://Assets/Graphics/Color defaults.png" type="Texture" id=8] -[ext_resource path="res://Assets/Graphics/Brush_button.png" type="Texture" id=9] -[ext_resource path="res://Styles/RulerStyle.tres" type="StyleBox" id=10] -[ext_resource path="res://Scripts/HorizontalRuler.gd" type="Script" id=11] -[ext_resource path="res://Scripts/VerticalRuler.gd" type="Script" id=12] -[ext_resource path="res://Prefabs/Canvas.tscn" type="PackedScene" id=13] -[ext_resource path="res://Scripts/CameraMovement.gd" type="Script" id=14] -[ext_resource path="res://Scripts/SelectionRectangle.gd" type="Script" id=15] -[ext_resource path="res://Scripts/SecondViewport.gd" type="Script" id=16] -[ext_resource path="res://Assets/Graphics/Timeline/Go_To_First_Frame.png" type="Texture" id=17] -[ext_resource path="res://Assets/Graphics/Timeline/Previous_Frame.png" type="Texture" id=18] -[ext_resource path="res://Assets/Graphics/Timeline/Play Backwards.png" type="Texture" id=19] -[ext_resource path="res://Assets/Graphics/Timeline/Pause.png" type="Texture" id=20] -[ext_resource path="res://Assets/Graphics/Timeline/Play.png" type="Texture" id=21] -[ext_resource path="res://Assets/Graphics/Timeline/Next_Frame.png" type="Texture" id=22] -[ext_resource path="res://Assets/Graphics/Timeline/Go_To_Last_Frame.png" type="Texture" id=23] -[ext_resource path="res://Assets/Graphics/Timeline/Loop_None.png" type="Texture" id=24] -[ext_resource path="res://Scripts/TimelineSeconds.gd" type="Script" id=25] -[ext_resource path="res://Assets/Graphics/Timeline/New_Frame.png" type="Texture" id=26] -[ext_resource path="res://Assets/Graphics/Layers/new_layer.png" type="Texture" id=27] -[ext_resource path="res://Assets/Graphics/Layers/delete_layer.png" type="Texture" id=28] -[ext_resource path="res://Assets/Graphics/Layers/delete_layer_disabled.png" type="Texture" id=29] -[ext_resource path="res://Assets/Graphics/Layers/move_up.png" type="Texture" id=30] -[ext_resource path="res://Assets/Graphics/Layers/move_up_disabled.png" type="Texture" id=31] -[ext_resource path="res://Assets/Graphics/Layers/move_down.png" type="Texture" id=32] -[ext_resource path="res://Assets/Graphics/Layers/move_down_disabled.png" type="Texture" id=33] -[ext_resource path="res://Assets/Graphics/Layers/clone_layer.png" type="Texture" id=34] -[ext_resource path="res://Assets/Graphics/Layers/merge_down.png" type="Texture" id=35] -[ext_resource path="res://Assets/Graphics/Layers/merge_down_disabled.png" type="Texture" id=36] -[ext_resource path="res://Prefabs/BrushButton.tscn" type="PackedScene" id=37] -[ext_resource path="res://Assets/Graphics/Canvas_split.png" type="Texture" id=38] -[ext_resource path="res://Assets/Graphics/Canvas_unsplit.png" type="Texture" id=39] -[ext_resource path="res://Scripts/AboutDialog.gd" type="Script" id=40] +[ext_resource path="res://Assets/Graphics/Tools/ColorPicker.png" type="Texture" id=3] +[ext_resource path="res://Assets/Graphics/Tools/Pencil_l.png" type="Texture" id=4] +[ext_resource path="res://Assets/Graphics/Tools/Eraser_r.png" type="Texture" id=5] +[ext_resource path="res://Assets/Graphics/Tools/Bucket.png" type="Texture" id=6] +[ext_resource path="res://Assets/Graphics/Tools/LightenDarken.png" type="Texture" id=7] +[ext_resource path="res://Assets/Graphics/Color switch.png" type="Texture" id=8] +[ext_resource path="res://Assets/Graphics/Color defaults.png" type="Texture" id=9] +[ext_resource path="res://Assets/Graphics/Brush_button.png" type="Texture" id=10] +[ext_resource path="res://Styles/RulerStyle.tres" type="StyleBox" id=11] +[ext_resource path="res://Scripts/HorizontalRuler.gd" type="Script" id=12] +[ext_resource path="res://Scripts/VerticalRuler.gd" type="Script" id=13] +[ext_resource path="res://Prefabs/Canvas.tscn" type="PackedScene" id=14] +[ext_resource path="res://Scripts/CameraMovement.gd" type="Script" id=15] +[ext_resource path="res://Scripts/SelectionRectangle.gd" type="Script" id=16] +[ext_resource path="res://Scripts/SecondViewport.gd" type="Script" id=17] +[ext_resource path="res://Assets/Graphics/Timeline/Go_To_First_Frame.png" type="Texture" id=18] +[ext_resource path="res://Assets/Graphics/Timeline/Previous_Frame.png" type="Texture" id=19] +[ext_resource path="res://Assets/Graphics/Timeline/Play Backwards.png" type="Texture" id=20] +[ext_resource path="res://Assets/Graphics/Timeline/Pause.png" type="Texture" id=21] +[ext_resource path="res://Assets/Graphics/Timeline/Play.png" type="Texture" id=22] +[ext_resource path="res://Assets/Graphics/Timeline/Next_Frame.png" type="Texture" id=23] +[ext_resource path="res://Assets/Graphics/Timeline/Go_To_Last_Frame.png" type="Texture" id=24] +[ext_resource path="res://Assets/Graphics/Timeline/Loop_None.png" type="Texture" id=25] +[ext_resource path="res://Scripts/TimelineSeconds.gd" type="Script" id=26] +[ext_resource path="res://Assets/Graphics/Timeline/New_Frame.png" type="Texture" id=27] +[ext_resource path="res://Assets/Graphics/Layers/new_layer.png" type="Texture" id=28] +[ext_resource path="res://Assets/Graphics/Layers/delete_layer.png" type="Texture" id=29] +[ext_resource path="res://Assets/Graphics/Layers/delete_layer_disabled.png" type="Texture" id=30] +[ext_resource path="res://Assets/Graphics/Layers/move_up.png" type="Texture" id=31] +[ext_resource path="res://Assets/Graphics/Layers/move_up_disabled.png" type="Texture" id=32] +[ext_resource path="res://Assets/Graphics/Layers/move_down.png" type="Texture" id=33] +[ext_resource path="res://Assets/Graphics/Layers/move_down_disabled.png" type="Texture" id=34] +[ext_resource path="res://Assets/Graphics/Layers/clone_layer.png" type="Texture" id=35] +[ext_resource path="res://Assets/Graphics/Layers/merge_down.png" type="Texture" id=36] +[ext_resource path="res://Assets/Graphics/Layers/merge_down_disabled.png" type="Texture" id=37] +[ext_resource path="res://Prefabs/BrushButton.tscn" type="PackedScene" id=38] +[ext_resource path="res://Assets/Graphics/Canvas_split.png" type="Texture" id=39] +[ext_resource path="res://Assets/Graphics/Canvas_unsplit.png" type="Texture" id=40] +[ext_resource path="res://Scripts/AboutDialog.gd" type="Script" id=41] [sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 0.223529, 0.223529, 0.243137, 1 ) @@ -167,7 +168,6 @@ rect_min_size = Vector2( 242, 0 ) size_flags_vertical = 3 [node name="Tools" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel"] -editor/display_folded = true anchor_right = 1.0 anchor_bottom = 1.0 margin_left = 8.0 @@ -178,36 +178,38 @@ size_flags_vertical = 3 custom_constants/separation = 32 [node name="MenusAndTools" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools"] -margin_right = 244.0 +editor/display_folded = true +margin_right = 226.0 margin_bottom = 125.0 custom_constants/separation = 17 -[node name="SelectionTools" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools"] -editor/display_folded = true -margin_right = 244.0 +[node name="UtilityTools" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools"] +margin_right = 226.0 margin_bottom = 54.0 -[node name="VBoxContainer" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/SelectionTools"] -margin_right = 244.0 +[node name="VBoxContainer" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/UtilityTools"] +editor/display_folded = true +margin_right = 226.0 margin_bottom = 18.0 custom_constants/separation = 0 -[node name="SelectionTools" type="Label" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/SelectionTools/VBoxContainer"] -margin_right = 244.0 +[node name="UtilityTools" type="Label" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/UtilityTools/VBoxContainer"] +margin_right = 226.0 margin_bottom = 14.0 -text = "Selection Tools" +text = "Utility Tools" -[node name="HSeparator6" type="HSeparator" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/SelectionTools/VBoxContainer"] +[node name="HSeparator6" type="HSeparator" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/UtilityTools/VBoxContainer"] margin_top = 14.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 18.0 -[node name="SelectionToolsContainer2" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/SelectionTools"] +[node name="SelectionToolsContainer2" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/UtilityTools"] +editor/display_folded = true margin_top = 22.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 54.0 -[node name="RectSelect" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/SelectionTools/SelectionToolsContainer2"] +[node name="RectSelect" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/UtilityTools/SelectionToolsContainer2"] margin_right = 32.0 margin_bottom = 32.0 hint_tooltip = "R for left mouse button @@ -217,32 +219,44 @@ mouse_default_cursor_shape = 2 button_mask = 3 texture_normal = ExtResource( 2 ) +[node name="ColorPicker" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/UtilityTools/SelectionToolsContainer2"] +margin_left = 36.0 +margin_right = 68.0 +margin_bottom = 32.0 +hint_tooltip = "Select a color from the canvas + +O for left mouse button +Alt + O for right mouse button" +mouse_default_cursor_shape = 2 +button_mask = 3 +texture_normal = ExtResource( 3 ) + [node name="DrawTools" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools"] editor/display_folded = true margin_top = 71.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 125.0 [node name="VBoxContainer" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/DrawTools"] editor/display_folded = true -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 18.0 custom_constants/separation = 0 [node name="DrawTools" type="Label" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/DrawTools/VBoxContainer"] -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 14.0 text = "Draw Tools" [node name="HSeparator5" type="HSeparator" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/DrawTools/VBoxContainer"] margin_top = 14.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 18.0 [node name="PaintToolsContainer" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/DrawTools"] editor/display_folded = true margin_top = 22.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 54.0 [node name="Pencil" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/DrawTools/PaintToolsContainer"] @@ -253,7 +267,7 @@ Alt + P for right mouse button Hold Shift to make a line" mouse_default_cursor_shape = 2 button_mask = 3 -texture_normal = ExtResource( 3 ) +texture_normal = ExtResource( 4 ) [node name="Eraser" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/DrawTools/PaintToolsContainer"] margin_left = 36.0 @@ -264,7 +278,7 @@ Alt + E for right mouse button Hold Shift to make a line" mouse_default_cursor_shape = 2 button_mask = 3 -texture_normal = ExtResource( 4 ) +texture_normal = ExtResource( 5 ) [node name="Bucket" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/DrawTools/PaintToolsContainer"] margin_left = 72.0 @@ -274,7 +288,7 @@ hint_tooltip = "B for left mouse button Alt + B for right mouse button" mouse_default_cursor_shape = 2 button_mask = 3 -texture_normal = ExtResource( 5 ) +texture_normal = ExtResource( 6 ) [node name="LightenDarken" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools/DrawTools/PaintToolsContainer"] margin_left = 108.0 @@ -284,23 +298,24 @@ hint_tooltip = "U for left mouse button Alt + U for right mouse button" mouse_default_cursor_shape = 2 button_mask = 3 -texture_normal = ExtResource( 6 ) +texture_normal = ExtResource( 7 ) [node name="ToolOptions" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools"] +editor/display_folded = true margin_top = 157.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 612.0 size_flags_vertical = 3 custom_constants/separation = 0 [node name="ColorPickersCenter" type="CenterContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions"] editor/display_folded = true -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 32.0 [node name="ColorPickersHorizontal" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/ColorPickersCenter"] -margin_left = 45.0 -margin_right = 198.0 +margin_left = 36.0 +margin_right = 189.0 margin_bottom = 32.0 [node name="LeftColorPickerButton" type="ColorPickerButton" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/ColorPickersCenter/ColorPickersHorizontal"] @@ -329,7 +344,7 @@ margin_right = 17.0 margin_bottom = 7.0 hint_tooltip = "Switch left and right colors" mouse_default_cursor_shape = 2 -texture_normal = ExtResource( 7 ) +texture_normal = ExtResource( 8 ) [node name="ColorDefaults" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/ColorPickersCenter/ColorPickersHorizontal/ColorButtonsCenter/ColorButtonsVertical"] margin_top = 11.0 @@ -337,7 +352,7 @@ margin_right = 17.0 margin_bottom = 17.0 hint_tooltip = "Reset the colors to their default state (black for left, white for right)" mouse_default_cursor_shape = 2 -texture_normal = ExtResource( 8 ) +texture_normal = ExtResource( 9 ) [node name="RightColorPickerButton" type="ColorPickerButton" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/ColorPickersCenter/ColorPickersHorizontal"] margin_left = 89.0 @@ -353,25 +368,25 @@ color = Color( 1, 1, 1, 1 ) [node name="HSeparator" type="HSeparator" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions"] margin_top = 32.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 36.0 [node name="LeftToolOptions" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions"] margin_top = 36.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 243.0 size_flags_horizontal = 3 size_flags_vertical = 3 [node name="LeftLabel" type="Label" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/LeftToolOptions"] -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 14.0 text = "Left tool options" align = 1 [node name="LeftIndicatorCheckbox" type="CheckBox" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/LeftToolOptions"] margin_top = 18.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 42.0 hint_tooltip = "Show left mouse indicator when drawing" mouse_default_cursor_shape = 2 @@ -381,7 +396,7 @@ text = "Left cursor" [node name="LeftBrushType" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/LeftToolOptions"] editor/display_folded = true margin_top = 46.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 78.0 [node name="LeftBrushTypeButton" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/LeftToolOptions/LeftBrushType"] @@ -389,7 +404,7 @@ margin_right = 36.0 margin_bottom = 32.0 rect_min_size = Vector2( 36, 32 ) size_flags_horizontal = 0 -texture_normal = ExtResource( 9 ) +texture_normal = ExtResource( 10 ) [node name="BrushTexture" type="TextureRect" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/LeftToolOptions/LeftBrushType/LeftBrushTypeButton"] margin_right = 32.0 @@ -408,7 +423,7 @@ text = "Brush: Pixel" [node name="LeftBrushSize" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/LeftToolOptions"] editor/display_folded = true margin_top = 82.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 106.0 [node name="BrushSizeLabel" type="Label" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/LeftToolOptions/LeftBrushSize"] @@ -526,7 +541,7 @@ value = 0.1 [node name="LeftMirroring" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/LeftToolOptions"] editor/display_folded = true margin_top = 110.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 134.0 [node name="LeftHorizontalMirroring" type="CheckBox" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/LeftToolOptions/LeftMirroring"] @@ -546,25 +561,25 @@ text = "Vert. Mirror" [node name="HSeparator2" type="HSeparator" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions"] margin_top = 243.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 247.0 [node name="RightToolOptions" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions"] margin_top = 247.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 455.0 size_flags_horizontal = 3 size_flags_vertical = 3 [node name="RightLabel" type="Label" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/RightToolOptions"] -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 14.0 text = "Right tool options" align = 1 [node name="RightIndicatorCheckbox" type="CheckBox" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/RightToolOptions"] margin_top = 18.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 42.0 hint_tooltip = "Show right mouse indicator when drawing" mouse_default_cursor_shape = 2 @@ -573,7 +588,7 @@ text = "Right cursor" [node name="RightBrushType" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/RightToolOptions"] editor/display_folded = true margin_top = 46.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 78.0 [node name="RightBrushTypeButton" type="TextureButton" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/RightToolOptions/RightBrushType"] @@ -581,7 +596,7 @@ margin_right = 36.0 margin_bottom = 32.0 rect_min_size = Vector2( 36, 32 ) size_flags_horizontal = 0 -texture_normal = ExtResource( 9 ) +texture_normal = ExtResource( 10 ) [node name="BrushTexture" type="TextureRect" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/RightToolOptions/RightBrushType/RightBrushTypeButton"] margin_right = 32.0 @@ -600,7 +615,7 @@ text = "Brush: Pixel" [node name="RightBrushSize" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/RightToolOptions"] editor/display_folded = true margin_top = 82.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 106.0 [node name="BrushSizeLabel" type="Label" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/RightToolOptions/RightBrushSize"] @@ -717,7 +732,7 @@ value = 0.1 [node name="RightMirroring" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/RightToolOptions"] editor/display_folded = true margin_top = 110.0 -margin_right = 244.0 +margin_right = 226.0 margin_bottom = 134.0 [node name="RightHorizontalMirroring" type="CheckBox" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/RightToolOptions/RightMirroring"] @@ -761,13 +776,13 @@ margin_right = 686.0 margin_bottom = 16.0 rect_min_size = Vector2( 0, 16 ) focus_mode = 0 -custom_styles/hover = ExtResource( 10 ) -custom_styles/pressed = ExtResource( 10 ) -custom_styles/focus = ExtResource( 10 ) -custom_styles/normal = ExtResource( 10 ) +custom_styles/hover = ExtResource( 11 ) +custom_styles/pressed = ExtResource( 11 ) +custom_styles/focus = ExtResource( 11 ) +custom_styles/normal = ExtResource( 11 ) action_mode = 0 enabled_focus_mode = 0 -script = ExtResource( 11 ) +script = ExtResource( 12 ) [node name="ViewportandVerticalRuler" type="HBoxContainer" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer/ViewportAndRulers"] editor/display_folded = true @@ -784,13 +799,13 @@ rect_min_size = Vector2( 16, 0 ) focus_mode = 0 size_flags_horizontal = 0 size_flags_vertical = 3 -custom_styles/hover = ExtResource( 10 ) -custom_styles/pressed = ExtResource( 10 ) -custom_styles/focus = ExtResource( 10 ) -custom_styles/normal = ExtResource( 10 ) +custom_styles/hover = ExtResource( 11 ) +custom_styles/pressed = ExtResource( 11 ) +custom_styles/focus = ExtResource( 11 ) +custom_styles/normal = ExtResource( 11 ) action_mode = 0 enabled_focus_mode = 0 -script = ExtResource( 12 ) +script = ExtResource( 13 ) [node name="ViewportContainer" type="ViewportContainer" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer/ViewportAndRulers/ViewportandVerticalRuler"] margin_left = 16.0 @@ -805,18 +820,18 @@ size = Vector2( 670, 462 ) handle_input_locally = false render_target_update_mode = 3 -[node name="Canvas" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer/ViewportAndRulers/ViewportandVerticalRuler/ViewportContainer/Viewport" instance=ExtResource( 13 )] +[node name="Canvas" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer/ViewportAndRulers/ViewportandVerticalRuler/ViewportContainer/Viewport" instance=ExtResource( 14 )] [node name="Camera2D" type="Camera2D" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer/ViewportAndRulers/ViewportandVerticalRuler/ViewportContainer/Viewport"] current = true zoom = Vector2( 0.15, 0.15 ) -script = ExtResource( 14 ) +script = ExtResource( 15 ) [node name="SelectionRectangle" type="Polygon2D" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer/ViewportAndRulers/ViewportandVerticalRuler/ViewportContainer/Viewport"] z_index = 1 color = Color( 0.0823529, 0.694118, 0.623529, 0.592157 ) polygon = PoolVector2Array( 0, 0, 0, 0, 0, 0, 0, 0 ) -script = ExtResource( 15 ) +script = ExtResource( 16 ) [node name="ViewportSeparator" type="VSeparator" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer"] visible = false @@ -837,12 +852,12 @@ stretch = true size = Vector2( 341, 478 ) handle_input_locally = false render_target_update_mode = 0 -script = ExtResource( 16 ) +script = ExtResource( 17 ) [node name="Camera2D2" type="Camera2D" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer/ViewportContainer2/Viewport"] current = true zoom = Vector2( 0.15, 0.15 ) -script = ExtResource( 14 ) +script = ExtResource( 15 ) [node name="AnimationTimeline" type="Panel" parent="MenuAndUI/UI/CanvasAndTimeline"] editor/display_folded = true @@ -900,14 +915,14 @@ size_flags_horizontal = 0 margin_right = 20.0 margin_bottom = 20.0 mouse_default_cursor_shape = 2 -texture_normal = ExtResource( 17 ) +texture_normal = ExtResource( 18 ) [node name="PreviousFrame" type="TextureButton" parent="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons"] margin_left = 24.0 margin_right = 44.0 margin_bottom = 20.0 mouse_default_cursor_shape = 2 -texture_normal = ExtResource( 18 ) +texture_normal = ExtResource( 19 ) [node name="PlayBackwards" type="TextureButton" parent="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons"] margin_left = 48.0 @@ -916,8 +931,8 @@ margin_bottom = 20.0 hint_tooltip = "Play the animation backwards (from end to beggining)" mouse_default_cursor_shape = 2 toggle_mode = true -texture_normal = ExtResource( 19 ) -texture_pressed = ExtResource( 20 ) +texture_normal = ExtResource( 20 ) +texture_pressed = ExtResource( 21 ) [node name="PlayForward" type="TextureButton" parent="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons"] margin_left = 72.0 @@ -927,22 +942,22 @@ hint_tooltip = "Play the animation forward (from beggining to end)" mouse_default_cursor_shape = 2 size_flags_horizontal = 0 toggle_mode = true -texture_normal = ExtResource( 21 ) -texture_pressed = ExtResource( 20 ) +texture_normal = ExtResource( 22 ) +texture_pressed = ExtResource( 21 ) [node name="NextFrame" type="TextureButton" parent="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons"] margin_left = 96.0 margin_right = 116.0 margin_bottom = 20.0 mouse_default_cursor_shape = 2 -texture_normal = ExtResource( 22 ) +texture_normal = ExtResource( 23 ) [node name="LastFrame" type="TextureButton" parent="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons"] margin_left = 120.0 margin_right = 140.0 margin_bottom = 20.0 mouse_default_cursor_shape = 2 -texture_normal = ExtResource( 23 ) +texture_normal = ExtResource( 24 ) [node name="LoopButtons" type="HBoxContainer" parent="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/TimelineContainer/AnimationButtons"] editor/display_folded = true @@ -971,7 +986,7 @@ margin_right = 98.0 margin_bottom = 24.0 hint_tooltip = "No loop" mouse_default_cursor_shape = 2 -texture_normal = ExtResource( 24 ) +texture_normal = ExtResource( 25 ) [node name="HSeparator" type="HSeparator" parent="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/TimelineContainer"] margin_top = 28.0 @@ -983,7 +998,7 @@ margin_top = 36.0 margin_right = 525.0 margin_bottom = 52.0 rect_min_size = Vector2( 0, 16 ) -script = ExtResource( 25 ) +script = ExtResource( 26 ) [node name="HSeparator2" type="HSeparator" parent="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/TimelineContainer"] margin_top = 56.0 @@ -1001,7 +1016,7 @@ margin_bottom = 36.0 hint_tooltip = "Add a new frame" mouse_default_cursor_shape = 2 size_flags_horizontal = 0 -texture_normal = ExtResource( 26 ) +texture_normal = ExtResource( 27 ) [node name="ScrollContainer" type="ScrollContainer" parent="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/TimelineContainer/FrameAndButtonContainer"] margin_left = 40.0 @@ -1102,7 +1117,7 @@ margin_right = 32.0 margin_bottom = 32.0 hint_tooltip = "Create a new layer" mouse_default_cursor_shape = 2 -texture_normal = ExtResource( 27 ) +texture_normal = ExtResource( 28 ) [node name="RemoveLayerButton" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/CenterContainer/LayerButtons"] margin_left = 36.0 @@ -1111,8 +1126,8 @@ margin_bottom = 32.0 hint_tooltip = "Remove current layer" mouse_default_cursor_shape = 8 disabled = true -texture_normal = ExtResource( 28 ) -texture_disabled = ExtResource( 29 ) +texture_normal = ExtResource( 29 ) +texture_disabled = ExtResource( 30 ) [node name="MoveUpLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/CenterContainer/LayerButtons"] margin_left = 72.0 @@ -1121,8 +1136,8 @@ margin_bottom = 32.0 hint_tooltip = "Move up the current layer" mouse_default_cursor_shape = 8 disabled = true -texture_normal = ExtResource( 30 ) -texture_disabled = ExtResource( 31 ) +texture_normal = ExtResource( 31 ) +texture_disabled = ExtResource( 32 ) [node name="MoveDownLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/CenterContainer/LayerButtons"] margin_left = 108.0 @@ -1131,8 +1146,8 @@ margin_bottom = 32.0 hint_tooltip = "Move down the current layer" mouse_default_cursor_shape = 8 disabled = true -texture_normal = ExtResource( 32 ) -texture_disabled = ExtResource( 33 ) +texture_normal = ExtResource( 33 ) +texture_disabled = ExtResource( 34 ) [node name="CloneLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/CenterContainer/LayerButtons"] margin_left = 144.0 @@ -1140,7 +1155,7 @@ margin_right = 176.0 margin_bottom = 32.0 hint_tooltip = "Clone current layer" mouse_default_cursor_shape = 2 -texture_normal = ExtResource( 34 ) +texture_normal = ExtResource( 35 ) [node name="MergeDownLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/CenterContainer/LayerButtons"] margin_left = 180.0 @@ -1149,8 +1164,8 @@ margin_bottom = 32.0 hint_tooltip = "Merge down current layer" mouse_default_cursor_shape = 8 disabled = true -texture_normal = ExtResource( 35 ) -texture_disabled = ExtResource( 36 ) +texture_normal = ExtResource( 36 ) +texture_disabled = ExtResource( 37 ) [node name="ScrollContainer" type="ScrollContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] editor/display_folded = true @@ -1188,7 +1203,7 @@ scroll_horizontal_enabled = false [node name="FileBrushContainer" type="GridContainer" parent="BrushesPopup/TabContainer/File"] columns = 5 -[node name="PixelBrushButton" parent="BrushesPopup/TabContainer/File/FileBrushContainer" instance=ExtResource( 37 )] +[node name="PixelBrushButton" parent="BrushesPopup/TabContainer/File/FileBrushContainer" instance=ExtResource( 38 )] hint_tooltip = "Pixel brush" [node name="Project" type="ScrollContainer" parent="BrushesPopup/TabContainer"] @@ -1215,8 +1230,8 @@ margin_right = -223.921 margin_bottom = 57.4745 size_flags_vertical = 0 toggle_mode = true -texture_normal = ExtResource( 38 ) -texture_pressed = ExtResource( 39 ) +texture_normal = ExtResource( 39 ) +texture_pressed = ExtResource( 40 ) [node name="CreateNewImage" type="ConfirmationDialog" parent="."] editor/display_folded = true @@ -1428,7 +1443,7 @@ editor/display_folded = true margin_right = 284.0 margin_bottom = 186.0 window_title = "About Pixelorama" -script = ExtResource( 40 ) +script = ExtResource( 41 ) [node name="AboutUI" type="VBoxContainer" parent="AboutDialog"] margin_left = 8.0 diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index e68508dec..f37436b23 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -219,6 +219,13 @@ func _process(delta) -> void: Global.selection_rectangle.polygon[1] = Vector2(end_pos.x, start_pos.y) Global.selection_rectangle.polygon[2] = end_pos Global.selection_rectangle.polygon[3] = Vector2(start_pos.x, end_pos.y) + "ColorPicker": + if mouse_in_canvas && Global.can_draw && Global.has_focus && Global.current_frame == frame: + var pixel_color : Color = layers[current_layer_index][0].get_pixelv(mouse_pos) + if current_mouse_button == "left_mouse": + Global.left_color_picker.color = pixel_color + elif current_mouse_button == "right_mouse": + Global.right_color_picker.color = pixel_color if !is_making_line: previous_mouse_pos = mouse_pos diff --git a/Scripts/Global.gd b/Scripts/Global.gd index fe6e1ee76..dfbad291e 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -120,7 +120,9 @@ var right_fill_area := 0 #0 for lighten, 1 for darken var left_ld := 0 var right_ld := 0 +# warning-ignore:unused_class_variable var left_ld_amount := 0.1 +# warning-ignore:unused_class_variable var right_ld_amount := 0.1 # warning-ignore:unused_class_variable diff --git a/Scripts/Main.gd b/Scripts/Main.gd index b9d6cb6f0..646692786 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -100,6 +100,7 @@ func _ready() -> void: tools.append([Global.find_node_by_name(root, "Bucket"), "left_fill_tool", "right_fill_tool"]) tools.append([Global.find_node_by_name(root, "LightenDarken"), "left_lightdark_tool", "right_lightdark_tool"]) tools.append([Global.find_node_by_name(root, "RectSelect"), "left_rectangle_select_tool", "right_rectangle_select_tool"]) + tools.append([Global.find_node_by_name(root, "ColorPicker"), "left_colorpicker_tool", "right_colorpicker_tool"]) for t in tools: t[0].connect("pressed", self, "_on_Tool_pressed", [t[0]]) diff --git a/project.godot b/project.godot index 5728350b0..acdaf256b 100644 --- a/project.godot +++ b/project.godot @@ -151,16 +151,6 @@ paste={ "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":86,"unicode":0,"echo":false,"script":null) ] } -left_paint_all_tool={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) - ] -} -right_paint_all_tool={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) - ] -} left_lightdark_tool={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":85,"unicode":0,"echo":false,"script":null) @@ -177,6 +167,16 @@ toggle_fullscreen={ , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null) ] } +left_colorpicker_tool={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":79,"unicode":0,"echo":false,"script":null) + ] +} +right_colorpicker_tool={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":79,"unicode":0,"echo":false,"script":null) + ] +} [rendering]