From d81d7ee5ef776f5c23a7134c93716ab547430188 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 7 Dec 2019 19:34:54 +0200 Subject: [PATCH] Grid size and color in preferences, update_texture optimization - Added grid size and color in preferences - Canvas' update_texture() updates the frame button's texture only when the user releases a mouse button. This should optimize drawing in large images. - Cursor is no longer invisible inside the canvas - Minor UI changes - Added some more translations. This is going to be a common thing in commits from now on. --- Main.tscn | 268 +++++++++++++--------- Scripts/Canvas.gd | 37 ++- Scripts/Global.gd | 6 + Scripts/Main.gd | 24 +- Translations/#Translations.csv | 17 +- Translations/#Translations.el.translation | Bin 2416 -> 3028 bytes Translations/#Translations.en.translation | Bin 1773 -> 2269 bytes 7 files changed, 211 insertions(+), 141 deletions(-) diff --git a/Main.tscn b/Main.tscn index 4820a9a7b..de72138f5 100644 --- a/Main.tscn +++ b/Main.tscn @@ -163,14 +163,12 @@ size_flags_vertical = 3 custom_constants/separation = 0 [node name="ToolPanel" type="Panel" parent="MenuAndUI/UI"] -editor/display_folded = true margin_right = 224.0 margin_bottom = 620.0 rect_min_size = Vector2( 224, 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 @@ -404,10 +402,10 @@ align = 1 margin_top = 19.0 margin_right = 208.0 margin_bottom = 43.0 -hint_tooltip = "Show left mouse indicator when drawing" +hint_tooltip = "Show left mouse pixel indicator or brush on the canvas when drawing" mouse_default_cursor_shape = 2 pressed = true -text = "Left cursor" +text = "Left pixel indicator" [node name="LeftBrushType" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/LeftToolOptions"] editor/display_folded = true @@ -598,9 +596,9 @@ align = 1 margin_top = 19.0 margin_right = 208.0 margin_bottom = 43.0 -hint_tooltip = "Show right mouse indicator when drawing" +hint_tooltip = "Show right mouse pixel indicator or brush on the canvas when drawing" mouse_default_cursor_shape = 2 -text = "Right cursor" +text = "Right pixel indicator" [node name="RightBrushType" type="HBoxContainer" parent="MenuAndUI/UI/ToolPanel/Tools/ToolOptions/RightToolOptions"] editor/display_folded = true @@ -1273,7 +1271,6 @@ margin_right = 200.0 margin_bottom = 70.0 [node name="VBoxContainer" type="VBoxContainer" parent="CreateNewImage"] -editor/display_folded = true margin_left = 8.0 margin_top = 8.0 margin_right = 192.0 @@ -1281,65 +1278,57 @@ margin_bottom = 106.0 [node name="ImageSize" type="Label" parent="CreateNewImage/VBoxContainer"] margin_right = 184.0 -margin_bottom = 14.0 +margin_bottom = 15.0 text = "Image Size" -[node name="WidthCont" type="HBoxContainer" parent="CreateNewImage/VBoxContainer"] -editor/display_folded = true -margin_top = 18.0 +[node name="OptionsContainer" type="GridContainer" parent="CreateNewImage/VBoxContainer"] +margin_top = 19.0 margin_right = 184.0 -margin_bottom = 42.0 +margin_bottom = 98.0 +columns = 2 -[node name="WidthLabel" type="Label" parent="CreateNewImage/VBoxContainer/WidthCont"] +[node name="WidthLabel" type="Label" parent="CreateNewImage/VBoxContainer/OptionsContainer"] margin_top = 5.0 -margin_right = 46.0 -margin_bottom = 19.0 +margin_right = 75.0 +margin_bottom = 20.0 text = "Width:" -[node name="WidthValue" type="SpinBox" parent="CreateNewImage/VBoxContainer/WidthCont"] -margin_left = 50.0 -margin_right = 124.0 -margin_bottom = 24.0 +[node name="WidthValue" type="SpinBox" parent="CreateNewImage/VBoxContainer/OptionsContainer"] +margin_left = 79.0 +margin_right = 143.0 +margin_bottom = 25.0 min_value = 1.0 max_value = 16384.0 value = 64.0 suffix = "px" -[node name="HeightCont" type="HBoxContainer" parent="CreateNewImage/VBoxContainer"] -margin_top = 46.0 -margin_right = 184.0 -margin_bottom = 70.0 - -[node name="Height" type="Label" parent="CreateNewImage/VBoxContainer/HeightCont"] -margin_top = 5.0 -margin_right = 46.0 -margin_bottom = 19.0 +[node name="Height" type="Label" parent="CreateNewImage/VBoxContainer/OptionsContainer"] +margin_top = 34.0 +margin_right = 75.0 +margin_bottom = 49.0 text = "Height:" -[node name="HeightValue" type="SpinBox" parent="CreateNewImage/VBoxContainer/HeightCont"] -margin_left = 50.0 -margin_right = 124.0 -margin_bottom = 24.0 +[node name="HeightValue" type="SpinBox" parent="CreateNewImage/VBoxContainer/OptionsContainer"] +margin_left = 79.0 +margin_top = 29.0 +margin_right = 143.0 +margin_bottom = 54.0 min_value = 1.0 max_value = 16384.0 value = 64.0 suffix = "px" -[node name="FillColor" type="HBoxContainer" parent="CreateNewImage/VBoxContainer"] -margin_top = 74.0 -margin_right = 184.0 -margin_bottom = 94.0 +[node name="FillColorLabel" type="Label" parent="CreateNewImage/VBoxContainer/OptionsContainer"] +margin_top = 61.0 +margin_right = 75.0 +margin_bottom = 76.0 +text = "Fill with color:" -[node name="FillColorLabel" type="Label" parent="CreateNewImage/VBoxContainer/FillColor"] -margin_top = 3.0 -margin_right = 94.0 -margin_bottom = 17.0 -text = "Fill with color: " - -[node name="FillColor" type="ColorPickerButton" parent="CreateNewImage/VBoxContainer/FillColor"] -margin_left = 98.0 -margin_right = 162.0 -margin_bottom = 20.0 +[node name="FillColor" type="ColorPickerButton" parent="CreateNewImage/VBoxContainer/OptionsContainer"] +margin_left = 79.0 +margin_top = 58.0 +margin_right = 143.0 +margin_bottom = 79.0 rect_min_size = Vector2( 64, 20 ) color = Color( 0, 0, 0, 0 ) @@ -1409,65 +1398,58 @@ margin_bottom = 106.0 [node name="ImageSize" type="Label" parent="ScaleImage/VBoxContainer"] margin_right = 184.0 -margin_bottom = 14.0 +margin_bottom = 15.0 text = "Image Size" -[node name="WidthCont" type="HBoxContainer" parent="ScaleImage/VBoxContainer"] -margin_top = 18.0 +[node name="OptionsContainer" type="GridContainer" parent="ScaleImage/VBoxContainer"] +editor/display_folded = true +margin_top = 19.0 margin_right = 184.0 -margin_bottom = 42.0 +margin_bottom = 98.0 +columns = 2 -[node name="WidthLabel" type="Label" parent="ScaleImage/VBoxContainer/WidthCont"] +[node name="WidthLabel" type="Label" parent="ScaleImage/VBoxContainer/OptionsContainer"] margin_top = 5.0 -margin_right = 46.0 -margin_bottom = 19.0 +margin_right = 72.0 +margin_bottom = 20.0 text = "Width:" -[node name="WidthValue" type="SpinBox" parent="ScaleImage/VBoxContainer/WidthCont"] -margin_left = 50.0 -margin_right = 124.0 -margin_bottom = 24.0 +[node name="WidthValue" type="SpinBox" parent="ScaleImage/VBoxContainer/OptionsContainer"] +margin_left = 76.0 +margin_right = 159.0 +margin_bottom = 25.0 min_value = 1.0 max_value = 16384.0 value = 64.0 suffix = "px" -[node name="HeightCont" type="HBoxContainer" parent="ScaleImage/VBoxContainer"] -editor/display_folded = true -margin_top = 46.0 -margin_right = 184.0 -margin_bottom = 70.0 - -[node name="Height" type="Label" parent="ScaleImage/VBoxContainer/HeightCont"] -margin_top = 5.0 -margin_right = 46.0 -margin_bottom = 19.0 +[node name="Height" type="Label" parent="ScaleImage/VBoxContainer/OptionsContainer"] +margin_top = 34.0 +margin_right = 72.0 +margin_bottom = 49.0 text = "Height:" -[node name="HeightValue" type="SpinBox" parent="ScaleImage/VBoxContainer/HeightCont"] -margin_left = 50.0 -margin_right = 124.0 -margin_bottom = 24.0 +[node name="HeightValue" type="SpinBox" parent="ScaleImage/VBoxContainer/OptionsContainer"] +margin_left = 76.0 +margin_top = 29.0 +margin_right = 159.0 +margin_bottom = 54.0 min_value = 1.0 max_value = 16384.0 value = 64.0 suffix = "px" -[node name="InterpolationContainer" type="HBoxContainer" parent="ScaleImage/VBoxContainer"] -margin_top = 74.0 -margin_right = 184.0 -margin_bottom = 94.0 - -[node name="InterpolationLabel" type="Label" parent="ScaleImage/VBoxContainer/InterpolationContainer"] -margin_top = 3.0 -margin_right = 87.0 -margin_bottom = 17.0 +[node name="InterpolationLabel" type="Label" parent="ScaleImage/VBoxContainer/OptionsContainer"] +margin_top = 61.0 +margin_right = 72.0 +margin_bottom = 76.0 text = "Interpolation:" -[node name="InterpolationType" type="OptionButton" parent="ScaleImage/VBoxContainer/InterpolationContainer"] -margin_left = 91.0 -margin_right = 182.0 -margin_bottom = 20.0 +[node name="InterpolationType" type="OptionButton" parent="ScaleImage/VBoxContainer/OptionsContainer"] +margin_left = 76.0 +margin_top = 58.0 +margin_right = 159.0 +margin_bottom = 79.0 text = "Nearest" items = [ "Nearest", null, false, 0, null, "Bilinear", null, false, 1, null, "Cubic", null, false, 2, null, "Trilinear", null, false, 3, null, "Lanczos", null, true, 4, null ] selected = 0 @@ -1478,24 +1460,89 @@ margin_right = 200.0 margin_bottom = 70.0 window_title = "Preferences" -[node name="LanguageContainer" type="HBoxContainer" parent="PreferencesDialog"] -margin_right = 40.0 -margin_bottom = 40.0 +[node name="VBoxContainer" type="VBoxContainer" parent="PreferencesDialog"] +anchor_left = 0.5 +anchor_right = 0.5 +margin_left = -92.0 +margin_top = 8.0 +margin_right = 92.0 +margin_bottom = 131.0 -[node name="LanguageLabel" type="Label" parent="PreferencesDialog/LanguageContainer"] -margin_top = 12.0 +[node name="OptionsContainer" type="GridContainer" parent="PreferencesDialog/VBoxContainer"] +margin_right = 184.0 +margin_bottom = 21.0 +columns = 2 + +[node name="LanguageLabel" type="Label" parent="PreferencesDialog/VBoxContainer/OptionsContainer"] +margin_top = 3.0 margin_right = 57.0 -margin_bottom = 27.0 +margin_bottom = 18.0 text = "Language:" -[node name="LanguageOption" type="OptionButton" parent="PreferencesDialog/LanguageContainer"] +[node name="LanguageOption" type="OptionButton" parent="PreferencesDialog/VBoxContainer/OptionsContainer"] margin_left = 61.0 margin_right = 142.0 -margin_bottom = 40.0 +margin_bottom = 21.0 text = "English" -items = [ "System Language", null, false, 0, null, "Greek", null, false, 1, null, "English", null, false, 2, null ] +items = [ "System Language", null, false, 0, null, "Greek [el]", null, false, 1, null, "English [en]", null, false, 2, null ] selected = 0 +[node name="GridOptionsLabel" type="Label" parent="PreferencesDialog/VBoxContainer"] +margin_top = 25.0 +margin_right = 184.0 +margin_bottom = 40.0 +text = "Grid options" + +[node name="GridOptions" type="GridContainer" parent="PreferencesDialog/VBoxContainer"] +margin_top = 44.0 +margin_right = 184.0 +margin_bottom = 123.0 +columns = 2 + +[node name="WidthLabel" type="Label" parent="PreferencesDialog/VBoxContainer/GridOptions"] +margin_top = 5.0 +margin_right = 39.0 +margin_bottom = 20.0 +text = "Width:" + +[node name="GridWidthValue" type="SpinBox" parent="PreferencesDialog/VBoxContainer/GridOptions"] +margin_left = 43.0 +margin_right = 107.0 +margin_bottom = 25.0 +min_value = 1.0 +max_value = 16384.0 +value = 1.0 +suffix = "px" + +[node name="Height" type="Label" parent="PreferencesDialog/VBoxContainer/GridOptions"] +margin_top = 34.0 +margin_right = 39.0 +margin_bottom = 49.0 +text = "Height:" + +[node name="GridHeightValue" type="SpinBox" parent="PreferencesDialog/VBoxContainer/GridOptions"] +margin_left = 43.0 +margin_top = 29.0 +margin_right = 107.0 +margin_bottom = 54.0 +min_value = 1.0 +max_value = 16384.0 +value = 1.0 +suffix = "px" + +[node name="GridColorLabel" type="Label" parent="PreferencesDialog/VBoxContainer/GridOptions"] +margin_top = 61.0 +margin_right = 39.0 +margin_bottom = 76.0 +text = "Color:" + +[node name="GridColor" type="ColorPickerButton" parent="PreferencesDialog/VBoxContainer/GridOptions"] +margin_left = 43.0 +margin_top = 58.0 +margin_right = 107.0 +margin_bottom = 79.0 +rect_min_size = Vector2( 64, 20 ) + [node name="AboutDialog" type="AcceptDialog" parent="."] editor/display_folded = true margin_right = 284.0 @@ -1511,15 +1558,15 @@ margin_bottom = 158.0 [node name="Pixelorama" type="Label" parent="AboutDialog/AboutUI"] margin_right = 268.0 -margin_bottom = 31.0 +margin_bottom = 33.0 text = "Pixelorama v0.3 " align = 1 [node name="MadeBy" type="Label" parent="AboutDialog/AboutUI"] -margin_top = 35.0 +margin_top = 37.0 margin_right = 268.0 -margin_bottom = 83.0 +margin_bottom = 88.0 text = "Your Free and Open Source Sprite Editor Developed by Orama Interactive " @@ -1527,9 +1574,9 @@ align = 1 [node name="Links" type="CenterContainer" parent="AboutDialog/AboutUI"] editor/display_folded = true -margin_top = 87.0 +margin_top = 92.0 margin_right = 268.0 -margin_bottom = 107.0 +margin_bottom = 113.0 [node name="LinkButtons" type="HBoxContainer" parent="AboutDialog/AboutUI/Links"] editor/display_folded = true @@ -1538,26 +1585,26 @@ margin_right = 231.0 margin_bottom = 21.0 [node name="Website" type="Button" parent="AboutDialog/AboutUI/Links/LinkButtons"] -margin_right = 65.0 -margin_bottom = 20.0 +margin_right = 55.0 +margin_bottom = 21.0 text = "Website" [node name="GitHub" type="Button" parent="AboutDialog/AboutUI/Links/LinkButtons"] -margin_left = 69.0 -margin_right = 162.0 -margin_bottom = 20.0 +margin_left = 59.0 +margin_right = 139.0 +margin_bottom = 21.0 text = "GitHub Repo" [node name="Donate" type="Button" parent="AboutDialog/AboutUI/Links/LinkButtons"] -margin_left = 166.0 -margin_right = 224.0 -margin_bottom = 20.0 +margin_left = 143.0 +margin_right = 194.0 +margin_bottom = 21.0 text = "Donate" [node name="Copyright" type="Label" parent="AboutDialog/AboutUI"] -margin_top = 111.0 +margin_top = 117.0 margin_right = 268.0 -margin_bottom = 142.0 +margin_bottom = 150.0 text = " Copyright 2019 - Orama Interactive" align = 1 @@ -1633,7 +1680,10 @@ dialog_text = "Are you sure you want to exit Pixelorama?" [connection signal="confirmed" from="ScaleImage" to="." method="_on_ScaleImage_confirmed"] [connection signal="popup_hide" from="ScaleImage" to="." method="_can_draw_true"] [connection signal="popup_hide" from="PreferencesDialog" to="." method="_can_draw_true"] -[connection signal="item_selected" from="PreferencesDialog/LanguageContainer/LanguageOption" to="." method="_on_LanguageOption_item_selected"] +[connection signal="item_selected" from="PreferencesDialog/VBoxContainer/OptionsContainer/LanguageOption" to="." method="_on_LanguageOption_item_selected"] +[connection signal="value_changed" from="PreferencesDialog/VBoxContainer/GridOptions/GridWidthValue" to="." method="_on_GridWidthValue_value_changed"] +[connection signal="value_changed" from="PreferencesDialog/VBoxContainer/GridOptions/GridHeightValue" to="." method="_on_GridHeightValue_value_changed"] +[connection signal="color_changed" from="PreferencesDialog/VBoxContainer/GridOptions/GridColor" to="." method="_on_GridColor_color_changed"] [connection signal="popup_hide" from="AboutDialog" to="." method="_can_draw_true"] [connection signal="pressed" from="AboutDialog/AboutUI/Links/LinkButtons/Website" to="AboutDialog" method="_on_Website_pressed"] [connection signal="pressed" from="AboutDialog/AboutUI/Links/LinkButtons/GitHub" to="AboutDialog" method="_on_GitHub_pressed"] diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index 7ec7acac6..fefbd9f30 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -112,8 +112,6 @@ func _process(delta : float) -> void: Input.set_custom_mouse_cursor(preload("res://Assets/Graphics/Tools/Bucket_Cursor.png"), 0, Vector2(6, 27)) elif Global.current_left_tool == "ColorPicker": Input.set_custom_mouse_cursor(preload("res://Assets/Graphics/Tools/ColorPicker_Cursor.png"), 0, Vector2(5, 28)) - elif Global.current_left_tool != "RectSelect": - Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) else: if !Input.is_mouse_button_pressed(BUTTON_LEFT) && !Input.is_mouse_button_pressed(BUTTON_RIGHT): if mouse_inside_canvas: @@ -121,10 +119,8 @@ func _process(delta : float) -> void: Global.cursor_position_label.text = "[%s×%s]" % [size.x, size.y] if cursor_inside_canvas: cursor_inside_canvas = false - Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) Input.set_custom_mouse_cursor(null) - #Handle Undo/Redo var can_handle : bool = mouse_in_canvas && Global.can_draw && Global.has_focus var mouse_pressed : bool = (Input.is_action_just_pressed("left_mouse") && !Input.is_action_pressed("right_mouse")) || (Input.is_action_just_pressed("right_mouse") && !Input.is_action_pressed("left_mouse")) @@ -276,7 +272,7 @@ func _process(delta : float) -> void: previous_action = current_action if sprite_changed_this_frame: - update_texture(current_layer_index) + update_texture(current_layer_index, (Input.is_action_just_released("left_mouse") || Input.is_action_just_released("right_mouse"))) func handle_undo(action : String) -> void: var canvases := [] @@ -319,22 +315,23 @@ func handle_redo(action : String) -> void: Global.undo_redo.add_do_method(Global, "redo", canvases, layer_index) Global.undo_redo.commit_action() -func update_texture(layer_index : int) -> void: +func update_texture(layer_index : int, update_frame_tex := true) -> void: layers[layer_index][1].create_from_image(layers[layer_index][0], 0) var layer_container := get_layer_container(layer_index) if layer_container: layer_container.get_child(0).get_child(1).texture = layers[layer_index][1] - #This code is used to update the texture in the animation timeline frame button - #but blend_rect causes major performance issues on large images - var whole_image := Image.new() - whole_image.create(size.x, size.y, false, Image.FORMAT_RGBA8) - for layer in layers: - whole_image.blend_rect(layer[0], Rect2(position, size), Vector2.ZERO) - layer[0].lock() - var whole_image_texture := ImageTexture.new() - whole_image_texture.create_from_image(whole_image, 0) - frame_texture_rect.texture = whole_image_texture + if update_frame_tex: + #This code is used to update the texture in the animation timeline frame button + #but blend_rect causes major performance issues on large images + var whole_image := Image.new() + whole_image.create(size.x, size.y, false, Image.FORMAT_RGBA8) + for layer in layers: + whole_image.blend_rect(layer[0], Rect2(position, size), Vector2.ZERO) + layer[0].lock() + var whole_image_texture := ImageTexture.new() + whole_image_texture.create_from_image(whole_image, 0) + frame_texture_rect.texture = whole_image_texture func frame_changed(value : int) -> void: frame = value @@ -394,10 +391,10 @@ func _draw() -> void: #Idea taken from flurick (on GitHub) if Global.draw_grid: - for x in size.x: - draw_line(Vector2(x, location.y), Vector2(x, size.y), Color.black, true) - for y in size.y: - draw_line(Vector2(location.x, y), Vector2(size.x, y), Color.black, true) + for x in range(0, size.x, Global.grid_width): + draw_line(Vector2(x, location.y), Vector2(x, size.y), Global.grid_color, true) + for y in range(0, size.y, Global.grid_height): + draw_line(Vector2(location.x, y), Vector2(size.x, y), Global.grid_color, true) #Draw rectangle to indicate the pixel currently being hovered on var mouse_pos := get_local_mouse_position() + location diff --git a/Scripts/Global.gd b/Scripts/Global.gd index 75d88ba85..9b9f230e4 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -15,6 +15,12 @@ var hidden_canvases := [] # warning-ignore:unused_class_variable var selected_pixels := [] var image_clipboard : Image +# warning-ignore:unused_class_variable +var grid_width := 1 +# warning-ignore:unused_class_variable +var grid_height := 1 +# warning-ignore:unused_class_variable +var grid_color := Color.black #Tools & options # warning-ignore:unused_class_variable diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 145478bb2..ce023b2c7 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -38,7 +38,7 @@ func _ready() -> void: # Set the language option menu's default selected option to the loaded locale var locale_index := loaded_locales.find(saved_locale) - $PreferencesDialog/LanguageContainer/LanguageOption.selected = locale_index + 1 + $PreferencesDialog/VBoxContainer/OptionsContainer/LanguageOption.selected = locale_index + 1 else: # If the user doesn't have a language preference, set it to their OS' locale TranslationServer.set_locale(OS.get_locale()) @@ -309,9 +309,9 @@ func help_menu_id_pressed(id : int) -> void: Global.can_draw = false func _on_CreateNewImage_confirmed() -> void: - var width = $CreateNewImage/VBoxContainer/WidthCont/WidthValue.value - var height = $CreateNewImage/VBoxContainer/HeightCont/HeightValue.value - var fill_color : Color = $CreateNewImage/VBoxContainer/FillColor/FillColor.color + var width : int = $CreateNewImage/VBoxContainer/OptionsContainer/WidthValue.value + var height : int = $CreateNewImage/VBoxContainer/OptionsContainer/HeightValue.value + var fill_color : Color = $CreateNewImage/VBoxContainer/OptionsContainer/FillColor.color clear_canvases() Global.canvas = load("res://Prefabs/Canvas.tscn").instance() Global.canvas.size = Vector2(width, height).floor() @@ -591,9 +591,9 @@ func save_spritesheet() -> void: OS.alert("Can't save file") func _on_ScaleImage_confirmed() -> void: - var width = $ScaleImage/VBoxContainer/WidthCont/WidthValue.value - var height = $ScaleImage/VBoxContainer/HeightCont/HeightValue.value - var interpolation = $ScaleImage/VBoxContainer/InterpolationContainer/InterpolationType.selected + var width : int = $ScaleImage/VBoxContainer/OptionsContainer/WidthValue.value + var height : int = $ScaleImage/VBoxContainer/OptionsContainer/HeightValue.value + var interpolation : int = $ScaleImage/VBoxContainer/OptionsContainer/InterpolationType.selected Global.undos += 1 Global.undo_redo.create_action("Scale") Global.undo_redo.add_do_property(Global.canvas, "size", Vector2(width, height).floor()) @@ -618,6 +618,15 @@ func _on_LanguageOption_item_selected(ID : int) -> void: config_cache.set_value("preferences", "locale", TranslationServer.get_locale()) config_cache.save("user://cache.ini") +func _on_GridWidthValue_value_changed(value : float) -> void: + Global.grid_width = value + +func _on_GridHeightValue_value_changed(value : float) -> void: + Global.grid_height = value + +func _on_GridColor_color_changed(color : Color) -> void: + Global.grid_color = color + func _on_ImportSprites_popup_hide() -> void: if !opensprite_file_selected: Global.can_draw = true @@ -1003,4 +1012,3 @@ func _exit_tree() -> void: config_cache.set_value("window", "position", OS.window_position) config_cache.set_value("window", "size", OS.window_size) config_cache.save("user://cache.ini") - diff --git a/Translations/#Translations.csv b/Translations/#Translations.csv index c117c3030..fe422558e 100644 --- a/Translations/#Translations.csv +++ b/Translations/#Translations.csv @@ -3,6 +3,7 @@ OK OK Εντάξει Cancel Cancel Άκυρο Open Open Άνοιγμα Please Confirm... Please Confirm... Παρακαλώ επιβεβαιώστε... +Image Size Image Size Μέγεθος εικόνας Width: Width: Πλάτος: Height: Height: Ύψος: File File Αρχείο @@ -25,15 +26,23 @@ Clear Selection Clear Selection Καθαρισμός επιλογής Flip Horizontal Flip Horizontal Οριζόντια αναστροφή Flip Vertical Flip Vertical Κάθετη αναστροφή Preferences Preferences Προτιμήσεις -Language: Language: Γλώσσα: -System Language System Language Γλώσσα Συστήματος -English English Αγγλικά -Greek Greek Ελληνικά Tile Mode Tile Mode Λειτουργία μοτίβου Show Grid Show Grid Εμφάνιση πλέγματος Show Rulers Show Rulers Εμφάνιση χαράκων Show Guides Show Guides Εμφάνιση οδηγών About Pixelorama About Pixelorama Σχετικά με το Pixelorama +Fill with color: Fill with color: Γέμισμα με χρώμα: +Interpolation: Interpolation: Παρεμβολή: +Nearest Nearest Χωρίς +Bilinear Bilinear Διγραμμική +Cubic Cubic Κυβική +Trilinear Trilinear Τριγραμμική +Grid options Grid options Επιλογές πλέγματος +Color: Color: Χρώμα: +Language: Language: Γλώσσα: +System Language System Language Γλώσσα Συστήματος +English English Αγγλικά +Greek Greek Ελληνικά Utility Tools Utility Tools Βοηθητικά Εργαλεία Draw Tools Draw Tools Εργαλεία Ζωγραφικής Left tool options Left tool options Επιλογές αριστερού εργαλείου diff --git a/Translations/#Translations.el.translation b/Translations/#Translations.el.translation index 795e17d90ca5152c56b212b6601fa62ec73b1f41..bbe9c7cecf7b57431ce5d6d761bcbbd5b5882005 100644 GIT binary patch literal 3028 zcmbuBZERCj7{@QjHiUtKq5>*6xF{wF;dKc?G&rN#2i_BcptFo-8*Cl4MbtRhcpEh^ z9WbI$;t(Cgl)~7$uIp$+P!fqbSE43Fzi48jk`PQFYWyJnp3{5qQnpXtmT`~P`4 z&6X`+_JZYp_izq@*KLbbkdO??2-|NDmH{sCTPk*f?A{+8SxA-_L ziFm)uPvErO`;(lr-TMO0GWRZigMH<$%?gk0EAIVuk4*g6=kX$wI^`Vfd)uSm$^BiI zf8RY1dGy{GQRE$i=wisvy1HJ@%m8+uBfA8B4Sk=d|1ppE=9T+ZSAWwz|K^lsEret= zHY9T#niE?mXLXNU4PPvBsAxm*gHres?m}EOm1KvE5!|wtLdJjp*|9av@b|g&arB>K zt?a>Mcp>B85gPYX1N;b=jQqLb9b=;~veH84ZIw>AP_PE(VPrx##&?W)2Roa)P(gWl zpqSX5Yg3L3p9$sGf!LL-&kJ zChqmB3BHV{9^+p)W8KtQFs4ssTl}lP!093Ug^bKXMQUeMORG4&g_%P^WFS) zJ@UJh|IU`rJyfz3x!E6MUp#NkRr#%X%q1glm@_k31v3u0P$4u4y1?vIn>y$0R56uN z36-)`tJCB(b3LuH=$uBbXq+b1r8=D*h&wH{Uu9KX^@@YAyVW@aDJ=ShjjB^z6X>(f zc3T_uIeW3`bhcZnU8Plwgy`m3s>Rvk-r7l#RcE2Jid*U^L9)}PP0Nd}C9R;!5h_G>;P^; z8}C+qZeVe&;f- zyWG0bWr#GGgJ(5uQ1A-L5N8Cpx4)Im=+d>YeYqcvBn?dJbB;L^N|o!o`?l!Kmmg-IuP|wM*LxH;z%p zqz0N4nb9%Bbhr@Hb?Zvkb=~#_FBW5#b3zoOS4QK7Awe`6^+xe|PQT-tI=r#u$vN-y z{=et_7Fu_=K5aO^8*r`yc&-OpcDO>FZ9$hmn5b4Fu(38MoltiR#+Ju6;hsSO;-mkNY(% z>=4Wp3J1M@Pr)tZ4tl%8APXJdj8jEwsH>|tD%doBEB1UN6dXvIb6P%wlnK-U{9SW? zjCxy!=_dyDz{jt4V{yBRuStH*nl!&Qk0DxKKH=9eVBn@!{}aAC$v? z6Yhl0|Hfl4r1z}AH{~XWBk(V^|NZ;RYkq`(y#tu2SR0n?{%;Vp3Nms3D_@PBg;M9& z`Nl%Ge>)C=yG3aJ;fmgHHH59;2$ZCB&o>XZodVAfgg7}>XY?A}$ZhH*uX1HgvKNS7_v6krpX=1a!&}CxtDNVulVB2gRHm zK!kabgGJVa_Pof7w2X;)LyR&UGUUXpNSIyTL+A zkyo{>kOg5=ut|tn8D*Xl2UENQJ`IZ$ievJmj1)S`A*hXh#%07rrED-KYQL%c7>h3$kYvQtbPiERu!iCQv9 zgD1NlZ_22QDCMAf+Y|QC5V0lkBU|H#aPge_3uAG9{dLq0PZ6xjf`SB>#7fL*QoA z__?2R@;KkUF#f_KsLdEc28L4$#i784=~z6R(M_BeF@eG})U<bj$OK!|?<*AX{}|Cxj-D>A$CfhmT|GX;q=>|Fl{wZUxsQ&CimbmW^l=+yb?^C7&hUCy%vI P3*!tHe*;?af33d(d~u&4 diff --git a/Translations/#Translations.en.translation b/Translations/#Translations.en.translation index 37e58d508d59ce2014c9e72fdbc5d4ef29136ee4..dbf471318f81820ea2691afa9c3be6f5312bac67 100644 GIT binary patch literal 2269 zcmbtWT}&KR6u#85UCNdU##*3}sU=zorJ=Ueth6dDzm}iwZUN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