From c9071f30eb1e6be9ddceca69b678add7034b51db Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 17 Dec 2019 04:01:38 +0200 Subject: [PATCH] Changed brush color interpolation and LightenDarken amount's range from 0-100, instead of 0-1 --- Main.tscn | 136 ++++++++++++++++---------------- Scripts/Global.gd | 4 +- Scripts/Main.gd | 4 +- Themes & Styles/Main Theme.tres | 20 ++--- Translations/#Translations.csv | 2 +- 5 files changed, 85 insertions(+), 81 deletions(-) diff --git a/Main.tscn b/Main.tscn index e20a2e6a4..b9bcbdc39 100644 --- a/Main.tscn +++ b/Main.tscn @@ -208,6 +208,7 @@ text = "[64×64]" align = 2 [node name="UI" type="HBoxContainer" parent="MenuAndUI"] +editor/display_folded = true margin_top = 28.0 margin_right = 1152.0 margin_bottom = 648.0 @@ -232,11 +233,13 @@ size_flags_vertical = 3 custom_constants/separation = 32 [node name="MenusAndTools" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools"] +editor/display_folded = true margin_right = 208.0 margin_bottom = 127.0 custom_constants/separation = 17 [node name="UtilityTools" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools"] +editor/display_folded = true margin_right = 208.0 margin_bottom = 55.0 @@ -279,6 +282,7 @@ button_mask = 3 texture_normal = ExtResource( 4 ) [node name="DrawTools" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/MenusAndTools"] +editor/display_folded = true margin_top = 72.0 margin_right = 208.0 margin_bottom = 127.0 @@ -340,6 +344,7 @@ button_mask = 3 texture_normal = ExtResource( 8 ) [node name="ColorAndToolOptions" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools"] +editor/display_folded = true margin_top = 159.0 margin_right = 208.0 margin_bottom = 612.0 @@ -368,6 +373,7 @@ size_flags_vertical = 0 flat = true [node name="ColorButtonsCenter" type="CenterContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/ColorPickersCenter/ColorPickersHorizontal"] +editor/display_folded = true margin_left = 68.0 margin_right = 85.0 margin_bottom = 32.0 @@ -412,6 +418,7 @@ margin_right = 208.0 margin_bottom = 103.0 [node name="LeftToolOptions" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions"] +editor/display_folded = true margin_top = 111.0 margin_right = 208.0 margin_bottom = 242.0 @@ -484,26 +491,24 @@ suffix = "px" [node name="LeftColorInterpolation" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/LeftToolOptions"] editor/display_folded = true visible = false -margin_top = 112.0 +margin_top = 96.0 margin_right = 208.0 -margin_bottom = 137.0 +margin_bottom = 113.0 [node name="ColorComesFrom" type="Label" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/LeftToolOptions/LeftColorInterpolation"] -margin_top = 5.0 +margin_top = 1.0 margin_right = 90.0 -margin_bottom = 20.0 +margin_bottom = 16.0 hint_tooltip = "COLORFROM_HT" text = "Brush color from" [node name="LeftInterpolateFactor" type="SpinBox" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/LeftToolOptions/LeftColorInterpolation"] margin_left = 94.0 margin_right = 208.0 -margin_bottom = 25.0 +margin_bottom = 17.0 hint_tooltip = "COLORFROM_HT" size_flags_horizontal = 3 -max_value = 1.0 -step = 0.01 -value = 1.0 +value = 100.0 [node name="LeftFillArea" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/LeftToolOptions"] editor/display_folded = true @@ -528,38 +533,37 @@ selected = 0 [node name="LeftLDOptions" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/LeftToolOptions"] editor/display_folded = true visible = false -margin_top = 110.0 -margin_right = 244.0 -margin_bottom = 158.0 +margin_top = 96.0 +margin_right = 208.0 +margin_bottom = 140.0 [node name="LeftLightenDarken" type="OptionButton" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/LeftToolOptions/LeftLDOptions"] -margin_right = 244.0 -margin_bottom = 20.0 +margin_right = 208.0 +margin_bottom = 23.0 text = "Lighten" items = [ "Lighten", null, false, 0, null, "Darken", null, false, 1, null ] selected = 0 [node name="LeftLDAmount" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/LeftToolOptions/LeftLDOptions"] -margin_top = 24.0 -margin_right = 244.0 -margin_bottom = 48.0 +margin_top = 27.0 +margin_right = 208.0 +margin_bottom = 44.0 [node name="LDAmountLabel" type="Label" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/LeftToolOptions/LeftLDOptions/LeftLDAmount"] -margin_top = 5.0 -margin_right = 55.0 -margin_bottom = 19.0 +margin_top = 1.0 +margin_right = 47.0 +margin_bottom = 16.0 text = "Amount:" [node name="LeftLDAmountSpinbox" type="SpinBox" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/LeftToolOptions/LeftLDOptions/LeftLDAmount"] -margin_left = 59.0 -margin_right = 133.0 -margin_bottom = 24.0 +margin_left = 51.0 +margin_right = 115.0 +margin_bottom = 17.0 hint_tooltip = "LDAMOUNT_HT" -max_value = 1.0 -step = 0.01 -value = 0.1 +value = 10.0 [node name="LeftMirroring" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/LeftToolOptions"] +editor/display_folded = true margin_top = 96.0 margin_right = 208.0 margin_bottom = 131.0 @@ -667,26 +671,24 @@ suffix = "px" [node name="RightColorInterpolation" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/RightToolOptions"] editor/display_folded = true visible = false -margin_top = 112.0 +margin_top = 96.0 margin_right = 208.0 -margin_bottom = 137.0 +margin_bottom = 113.0 [node name="ColorComesFrom" type="Label" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/RightToolOptions/RightColorInterpolation"] -margin_top = 5.0 +margin_top = 1.0 margin_right = 90.0 -margin_bottom = 20.0 +margin_bottom = 16.0 hint_tooltip = "COLORFROM_HT" text = "Brush color from" [node name="RightInterpolateFactor" type="SpinBox" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/RightToolOptions/RightColorInterpolation"] margin_left = 94.0 margin_right = 208.0 -margin_bottom = 25.0 +margin_bottom = 17.0 hint_tooltip = "COLORFROM_HT" size_flags_horizontal = 3 -max_value = 1.0 -step = 0.01 -value = 1.0 +value = 100.0 [node name="RightFillArea" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/RightToolOptions"] editor/display_folded = true @@ -711,36 +713,34 @@ selected = 0 [node name="RightLDOptions" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/RightToolOptions"] editor/display_folded = true visible = false -margin_top = 110.0 -margin_right = 244.0 -margin_bottom = 158.0 +margin_top = 96.0 +margin_right = 208.0 +margin_bottom = 140.0 [node name="RightLightenDarken" type="OptionButton" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/RightToolOptions/RightLDOptions"] -margin_right = 244.0 -margin_bottom = 20.0 +margin_right = 208.0 +margin_bottom = 23.0 text = "Lighten" items = [ "Lighten", null, false, 0, null, "Darken", null, false, 1, null ] selected = 0 [node name="RightLDAmount" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/RightToolOptions/RightLDOptions"] -margin_top = 24.0 -margin_right = 244.0 -margin_bottom = 48.0 +margin_top = 27.0 +margin_right = 208.0 +margin_bottom = 44.0 [node name="LDAmountLabel" type="Label" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/RightToolOptions/RightLDOptions/RightLDAmount"] -margin_top = 5.0 -margin_right = 55.0 -margin_bottom = 19.0 +margin_top = 1.0 +margin_right = 47.0 +margin_bottom = 16.0 text = "Amount:" [node name="RightLDAmountSpinbox" type="SpinBox" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/RightToolOptions/RightLDOptions/RightLDAmount"] -margin_left = 59.0 -margin_right = 133.0 -margin_bottom = 24.0 +margin_left = 51.0 +margin_right = 115.0 +margin_bottom = 17.0 hint_tooltip = "LDAMOUNT_HT" -max_value = 1.0 -step = 0.01 -value = 0.1 +value = 10.0 [node name="RightMirroring" type="VBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ColorAndToolOptions/RightToolOptions"] editor/display_folded = true @@ -774,6 +774,7 @@ mouse_default_cursor_shape = 2 text = "Vertical" [node name="CanvasAndTimeline" type="VBoxContainer" parent="MenuAndUI/UI"] +editor/display_folded = true margin_left = 224.0 margin_right = 928.0 margin_bottom = 620.0 @@ -888,6 +889,7 @@ zoom = Vector2( 0.15, 0.15 ) script = ExtResource( 16 ) [node name="AnimationTimeline" type="Panel" parent="MenuAndUI/UI/CanvasAndTimeline"] +editor/display_folded = true margin_top = 478.0 margin_right = 704.0 margin_bottom = 620.0 @@ -1113,6 +1115,7 @@ margin_right = 689.0 margin_bottom = 138.0 [node name="LayerPanel" type="Panel" parent="MenuAndUI/UI"] +editor/display_folded = true margin_left = 928.0 margin_right = 1152.0 margin_bottom = 620.0 @@ -1162,6 +1165,7 @@ margin_right = 224.0 margin_bottom = 199.0 [node name="LayerVBoxContainer" type="VBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] +editor/display_folded = true margin_top = 203.0 margin_right = 224.0 margin_bottom = 384.0 @@ -1341,10 +1345,10 @@ hint_tooltip = "Pixel brush" visible = false anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 4.0 -margin_top = 32.0 -margin_right = -4.0 -margin_bottom = -4.0 +margin_left = 5.0 +margin_top = 39.0 +margin_right = -5.0 +margin_bottom = -5.0 rect_min_size = Vector2( 0, 36 ) size_flags_horizontal = 3 scroll_horizontal_enabled = false @@ -1375,7 +1379,7 @@ margin_bottom = 70.0 margin_left = 8.0 margin_top = 8.0 margin_right = 192.0 -margin_bottom = 34.0 +margin_bottom = 31.0 [node name="ImageSize" type="Label" parent="CreateNewImage/VBoxContainer"] margin_right = 184.0 @@ -1441,8 +1445,8 @@ resizable = true mode = 0 access = 2 filters = PoolStringArray( "*.pxo ; Pixelorama Project" ) -current_dir = "C:/Users/User/Desktop/Pixelorama themes" -current_path = "C:/Users/User/Desktop/Pixelorama themes/" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="SaveSprite" type="FileDialog" parent="."] anchor_left = 0.5 @@ -1457,8 +1461,8 @@ window_title = "Save Sprite as .pxo" resizable = true access = 2 filters = PoolStringArray( "*.pxo ; Pixelorama Project" ) -current_dir = "C:/Users/User/Desktop/Pixelorama themes" -current_path = "C:/Users/User/Desktop/Pixelorama themes/" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="ImportSprites" type="FileDialog" parent="."] margin_right = 515.0 @@ -1468,8 +1472,8 @@ resizable = true mode = 1 access = 2 filters = PoolStringArray( "*.bmp ; BMP Image", "*.hdr ; Radiance HDR Image", "*.jpg,*.jpeg ; JPEG Image", "*.png ; PNG Image", "*.svg ; SVG Image", "*.tga ; TGA Image", "*.webp ; WebP Image" ) -current_dir = "C:/Users/User/Desktop/Pixelorama themes" -current_path = "C:/Users/User/Desktop/Pixelorama themes/" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="ExportSprites" type="FileDialog" parent="."] anchor_left = 0.5 @@ -1484,8 +1488,8 @@ window_title = "Export Sprite" resizable = true access = 2 filters = PoolStringArray( "*.png ; PNG Image" ) -current_dir = "C:/Users/User/Desktop/Pixelorama themes" -current_path = "C:/Users/User/Desktop/Pixelorama themes/" +current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama" +current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/" [node name="ScaleImage" type="ConfirmationDialog" parent="."] editor/display_folded = true @@ -1496,7 +1500,7 @@ margin_bottom = 114.0 margin_left = 8.0 margin_top = 8.0 margin_right = 192.0 -margin_bottom = 78.0 +margin_bottom = 75.0 [node name="ImageSize" type="Label" parent="ScaleImage/VBoxContainer"] margin_right = 184.0 @@ -1569,7 +1573,7 @@ anchor_right = 0.5 margin_left = -92.0 margin_top = 8.0 margin_right = 92.0 -margin_bottom = 34.0 +margin_bottom = 31.0 [node name="OptionsContainer" type="GridContainer" parent="PreferencesDialog/VBoxContainer"] margin_right = 184.0 @@ -1657,7 +1661,7 @@ script = ExtResource( 43 ) margin_left = 8.0 margin_top = 8.0 margin_right = 276.0 -margin_bottom = 150.0 +margin_bottom = 147.0 [node name="Pixelorama" type="Label" parent="AboutDialog/AboutUI"] margin_right = 268.0 diff --git a/Scripts/Global.gd b/Scripts/Global.gd index 6d2fa37bf..64615c3c5 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -439,7 +439,7 @@ func update_left_custom_brush() -> void: custom_brush.copy_from(custom_brushes[custom_left_brush_index]) var custom_brush_size = custom_brush.get_size() custom_brush.resize(custom_brush_size.x * left_brush_size, custom_brush_size.y * left_brush_size, Image.INTERPOLATE_NEAREST) - custom_left_brush_image = blend_image_with_color(custom_brush, left_color_picker.color, left_interpolate_slider.value) + custom_left_brush_image = blend_image_with_color(custom_brush, left_color_picker.color, left_interpolate_slider.value / 100) custom_left_brush_texture.create_from_image(custom_left_brush_image, 0) left_brush_type_button.get_child(0).texture = custom_left_brush_texture @@ -455,7 +455,7 @@ func update_right_custom_brush() -> void: custom_brush.copy_from(custom_brushes[custom_right_brush_index]) var custom_brush_size = custom_brush.get_size() custom_brush.resize(custom_brush_size.x * right_brush_size, custom_brush_size.y * right_brush_size, Image.INTERPOLATE_NEAREST) - custom_right_brush_image = blend_image_with_color(custom_brush, right_color_picker.color, right_interpolate_slider.value) + custom_right_brush_image = blend_image_with_color(custom_brush, right_color_picker.color, right_interpolate_slider.value / 100) custom_right_brush_texture.create_from_image(custom_right_brush_image, 0) right_brush_type_button.get_child(0).texture = custom_right_brush_texture diff --git a/Scripts/Main.gd b/Scripts/Main.gd index d6676e46a..66062e0ca 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -1012,12 +1012,12 @@ func _on_RightFillAreaOptions_item_selected(ID : int) -> void: func _on_LeftLightenDarken_item_selected(ID : int) -> void: Global.left_ld = ID func _on_LeftLDAmountSpinbox_value_changed(value : float) -> void: - Global.left_ld_amount = value + Global.left_ld_amount = value / 100 func _on_RightLightenDarken_item_selected(ID : int) -> void: Global.right_ld = ID func _on_RightLDAmountSpinbox_value_changed(value : float) -> void: - Global.right_ld_amount = value + Global.right_ld_amount = value / 100 func _on_LeftHorizontalMirroring_toggled(button_pressed) -> void: Global.left_horizontal_mirror = button_pressed diff --git a/Themes & Styles/Main Theme.tres b/Themes & Styles/Main Theme.tres index 3f3ee5d40..c9cffbb92 100644 --- a/Themes & Styles/Main Theme.tres +++ b/Themes & Styles/Main Theme.tres @@ -53,7 +53,7 @@ bg_color = Color( 0.6, 0.6, 0.6, 0 ) [sub_resource type="StyleBoxFlat" id=7] bg_color = Color( 0.6, 0.6, 0.6, 0 ) -[sub_resource type="StyleBoxFlat" id=12] +[sub_resource type="StyleBoxFlat" id=8] bg_color = Color( 0.321569, 0.321569, 0.321569, 1 ) border_width_left = 8 border_width_top = 1 @@ -66,7 +66,7 @@ corner_radius_bottom_right = 4 corner_radius_bottom_left = 4 anti_aliasing = false -[sub_resource type="StyleBoxFlat" id=8] +[sub_resource type="StyleBoxFlat" id=9] bg_color = Color( 0.321569, 0.321569, 0.321569, 1 ) border_width_left = 5 border_width_top = 10 @@ -79,7 +79,7 @@ corner_radius_bottom_right = 4 corner_radius_bottom_left = 4 anti_aliasing = false -[sub_resource type="StyleBoxFlat" id=9] +[sub_resource type="StyleBoxFlat" id=10] bg_color = Color( 0.2, 0.2, 0.2, 1 ) border_width_left = 10 border_width_top = 6 @@ -87,7 +87,7 @@ border_width_right = 10 border_width_bottom = 8 border_color = Color( 0.2, 0.2, 0.2, 1 ) -[sub_resource type="StyleBoxFlat" id=10] +[sub_resource type="StyleBoxFlat" id=11] bg_color = Color( 0.145098, 0.145098, 0.164706, 1 ) border_width_left = 10 border_width_top = 6 @@ -95,7 +95,7 @@ border_width_right = 10 border_width_bottom = 8 border_color = Color( 0.145098, 0.145098, 0.164706, 1 ) -[sub_resource type="StyleBoxFlat" id=11] +[sub_resource type="StyleBoxFlat" id=12] bg_color = Color( 0.321569, 0.321569, 0.321569, 1 ) border_width_left = 10 border_width_top = 6 @@ -146,7 +146,7 @@ LineEdit/constants/minimum_spaces = 12 LineEdit/fonts/font = null LineEdit/icons/clear = null LineEdit/styles/focus = null -LineEdit/styles/normal = SubResource( 12 ) +LineEdit/styles/normal = SubResource( 8 ) LineEdit/styles/read_only = null TabContainer/colors/font_color_bg = Color( 0.690196, 0.690196, 0.690196, 1 ) TabContainer/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 ) @@ -163,8 +163,8 @@ TabContainer/icons/increment = null TabContainer/icons/increment_highlight = null TabContainer/icons/menu = null TabContainer/icons/menu_highlight = null -TabContainer/styles/panel = SubResource( 8 ) -TabContainer/styles/tab_bg = SubResource( 9 ) -TabContainer/styles/tab_disabled = SubResource( 10 ) -TabContainer/styles/tab_fg = SubResource( 11 ) +TabContainer/styles/panel = SubResource( 9 ) +TabContainer/styles/tab_bg = SubResource( 10 ) +TabContainer/styles/tab_disabled = SubResource( 11 ) +TabContainer/styles/tab_fg = SubResource( 12 ) VBoxContainer/constants/separation = 4 diff --git a/Translations/#Translations.csv b/Translations/#Translations.csv index d44035bdc..88144abc7 100644 --- a/Translations/#Translations.csv +++ b/Translations/#Translations.csv @@ -81,7 +81,7 @@ Brush: Pixel,Brush: Pixel,Πινέλο: Εικονοστοιχείο,Brosse : Pi Custom brush,Custom brush,Προσαρμοσμένο πινέλο,Brosse personnalisée,Benutzerdefinierter Pinsel,Niestandardowy pędzel Brush size:,Brush size:,Μέγεθος πινέλου:,Taille de la brosse :,Pinselgröße:,Rozmiar pędzla: Brush color from,Brush color from,Χρώμα πινέλου από,Couleur de la brosse depuis,Pinselfarbe von,Nadpisywanie koloru pędzla -COLORFROM_HT,"0: Color from the brush itself, 1: the currently selected color","0: Χρώμα από το πινέλο, 1: επιλεγμένο χρώμα","0 : Couleur depuis la brosse elle-même, 1 : la couleur actuellement sélectionnée","0: Farbe von dem Pinsel selbst, 1: die aktuell ausgewählte Farbe","0: Kolor pochodzący z samego pędzla, 1: Obecnie wybrany kolor rysowania" +COLORFROM_HT,"0: Color from the brush itself, 100: the currently selected color","0: Χρώμα από το πινέλο, 100: επιλεγμένο χρώμα","0 : Couleur depuis la brosse elle-même, 100 : la couleur actuellement sélectionnée","0: Farbe von dem Pinsel selbst, 100: die aktuell ausgewählte Farbe","0: Kolor pochodzący z samego pędzla, 100: Obecnie wybrany kolor rysowania" Fill area:,Fill area:,Περιοχή γεμίσματος:,Remplissage de zone :,Fülle Bereich,Wypełnij przestrzeń: Area of the same color,Area of the same color,Περιοχή ίδιου χρώματος,Zone de la même couleur,Bereich mit der selben Farbe,Przestrzeń o takim samym kolorze All pixels of the same color,All pixels of the same color,Όλα τα πίξελ ίδιου χρώματος,Tous les pixels de la même couleur,Alle Pixel mit der selben Farbe,Wszystkie piksele tego samego koloru