diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fa423be4..982da66af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased This update has been brought to you by the contributions of: -Laurenz Reinthaler (Schweini07), kleonc, Fayez Akhtar (Variable) +Laurenz Reinthaler (Schweini07), kleonc, Fayez Akhtar (Variable), THWLF, Gamespleasure, ballerburg9005 ### Added - A new pan tool, used to move around the canvas. ([#399](https://github.com/Orama-Interactive/Pixelorama/pull/399)) @@ -20,7 +20,11 @@ Laurenz Reinthaler (Schweini07), kleonc, Fayez Akhtar (Variable) - Added offset options to the grid. ([#434](https://github.com/Orama-Interactive/Pixelorama/pull/434)) - The isometric grid has been refactored to work better and to offer more changeable options, such as the width and height of the cell bounds. ([#430](https://github.com/Orama-Interactive/Pixelorama/pull/430)) - Added portrait and landscape buttons in the new image dialog. +- Full support for auto Tallscren/Widescreen has been implemented. ([#458](https://github.com/Orama-Interactive/Pixelorama/pull/458)) - Added a new Centralize Image option in the Image menu, which places the visible pixels of the image in the center of the canvas. ([#441](https://github.com/Orama-Interactive/Pixelorama/pull/441)) +- Implemented the options to import a spritesheet as a new layer and to import an image and have it replace an already existing frame. ([#453](https://github.com/Orama-Interactive/Pixelorama/pull/453)) +- More templates have been added when creating a new sprite. ([#450](https://github.com/Orama-Interactive/Pixelorama/pull/450)) +- Added a keyboard shortcut for clear selection, `Control-D`. ([#457](https://github.com/Orama-Interactive/Pixelorama/pull/457)) ### Changed - Undo and redo now work when their respective keyboard shortcuts are being held. ([#405](https://github.com/Orama-Interactive/Pixelorama/pull/405)) diff --git a/Translations/Translations.pot b/Translations/Translations.pot index b028a78c8..a5c9512c1 100644 --- a/Translations/Translations.pot +++ b/Translations/Translations.pot @@ -154,6 +154,18 @@ msgstr "" msgid "Window Transparency" msgstr "" +msgid "Panel Layout" +msgstr "" + +msgid "Auto" +msgstr "" + +msgid "Widescreen" +msgstr "" + +msgid "Tallscreen" +msgstr "" + msgid "Mirror View" msgstr "" @@ -202,9 +214,15 @@ msgstr "" msgid "Spritesheet (new tab)" msgstr "" +msgid "Spritesheet (new layer)" +msgstr "" + msgid "New frame" msgstr "" +msgid "Replace frame" +msgstr "" + msgid "New layer" msgstr "" @@ -223,6 +241,9 @@ msgstr "" msgid "Vertical frames:" msgstr "" +msgid "Start frame:" +msgstr "" + msgid "Brush type:" msgstr "" diff --git a/src/Autoload/OpenSave.gd b/src/Autoload/OpenSave.gd index 1616d9e0c..d3ce32c99 100644 --- a/src/Autoload/OpenSave.gd +++ b/src/Autoload/OpenSave.gd @@ -398,7 +398,7 @@ func open_image_as_spritesheet_layer(path : String, image : Image, file_name : S # resize canvas to if "frame_width" or "frame_height" is too large var project_width :int = max(frame_width, Global.current_project.size.x) var project_height :int = max(frame_height, Global.current_project.size.y) - DrawingAlgos.resize_canvas(project_width, project_height,0 ,0) + DrawingAlgos.resize_canvas(project_width, project_height,0 ,0) # slice images var image_no :int = 0 @@ -424,14 +424,14 @@ func open_image_at_frame(image : Image, layer_index := 0, frame_index := 0) -> v project.undos += 1 project.undo_redo.create_action("Replaced Frame") - + var frames :Array = [] # create a duplicate of "project.frames" for i in project.frames.size(): var frame := Frame.new() frame.cels = project.frames[i].cels.duplicate(true) frames.append(frame) - + for i in project.frames.size(): if i == frame_index: image.convert(Image.FORMAT_RGBA8) @@ -445,7 +445,7 @@ func open_image_at_frame(image : Image, layer_index := 0, frame_index := 0) -> v project.undo_redo.add_undo_property(project, "frames", project.frames) project.undo_redo.add_undo_property(project, "current_frame", project.current_frame) - + project.undo_redo.add_do_method(Global, "redo") project.undo_redo.add_undo_method(Global, "undo") project.undo_redo.commit_action() diff --git a/src/Main.gd b/src/Main.gd index 64c96f0a4..28074af4f 100644 --- a/src/Main.gd +++ b/src/Main.gd @@ -69,7 +69,7 @@ func _ready() -> void: func handle_resize() -> void: var aspect_ratio = get_viewport_rect().size.x/(0.00001 if get_viewport_rect().size.y == 0 else get_viewport_rect().size.y) - if ( (aspect_ratio <= 3.0/4.0 and Global.panel_layout != Global.PanelLayout.WIDESCREEN) + if ( (aspect_ratio <= 3.0/4.0 and Global.panel_layout != Global.PanelLayout.WIDESCREEN) or Global.panel_layout == Global.PanelLayout.TALLSCREEN): change_ui_layout("tallscreen") else: @@ -78,12 +78,12 @@ func handle_resize() -> void: func change_ui_layout(mode : String) -> void: var colorpicker_is_switched = true if tool_and_palette_vsplit.has_node("ScrollContainer") else false - + if mode == "tallscreen" and not tallscreen_is_active: tallscreen_is_active = true reparent_node_to(right_panel, bottom_panel, 0) right_panel.rect_min_size.y = 300 - reparent_node_to(canvas_preview_container, tool_and_palette_vsplit, 1) + reparent_node_to(canvas_preview_container, tool_and_palette_vsplit, 1) tool_and_palette_vsplit = replace_node_with(tool_and_palette_vsplit, HBoxContainer.new()) color_and_tool_options.rect_min_size.x = 280 reparent_node_to(tool_panel, ui.get_node("CanvasAndTimeline/HBoxContainer"), 0) @@ -91,12 +91,12 @@ func change_ui_layout(mode : String) -> void: tallscreen_is_active = false reparent_node_to(right_panel, ui, -1) right_panel.rect_min_size.y = 0 - reparent_node_to(canvas_preview_container, right_panel.get_node("PreviewAndPalettes"), 0) + reparent_node_to(canvas_preview_container, right_panel.get_node("PreviewAndPalettes"), 0) tool_and_palette_vsplit = replace_node_with(tool_and_palette_vsplit, VSplitContainer.new()) color_and_tool_options.rect_min_size.x = 0 canvas_preview_container.visible = true reparent_node_to(tool_panel, ui, 0) - + if get_viewport_rect().size.x < 908 and mode == "tallscreen": canvas_preview_container.visible = false else: diff --git a/src/UI/Dialogs/AboutDialog.gd b/src/UI/Dialogs/AboutDialog.gd index 5799fe6e4..34eb18075 100644 --- a/src/UI/Dialogs/AboutDialog.gd +++ b/src/UI/Dialogs/AboutDialog.gd @@ -141,6 +141,9 @@ func create_contributors() -> void: contributors.create_item(contributor_root).set_text(0, " Rémi Verschelde (akien-mga)") contributors.create_item(contributor_root).set_text(0, " gschwind") contributors.create_item(contributor_root).set_text(0, " Fayez Akhtar (Variable)") + contributors.create_item(contributor_root).set_text(0, " THWLF") + contributors.create_item(contributor_root).set_text(0, " Gamespleasure") + contributors.create_item(contributor_root).set_text(0, " ballerburg9005") func create_translators() -> void: diff --git a/src/UI/Dialogs/CreateNewImage.gd b/src/UI/Dialogs/CreateNewImage.gd index be0bde96a..03bf40697 100644 --- a/src/UI/Dialogs/CreateNewImage.gd +++ b/src/UI/Dialogs/CreateNewImage.gd @@ -18,7 +18,7 @@ var templates := [ Template.new(Vector2(32, 32)), Template.new(Vector2(64, 64)), Template.new(Vector2(128, 128)), - + # Nintendo Template.new(Vector2(160, 144), "GB"), Template.new(Vector2(240, 160), "GBA"), @@ -28,17 +28,17 @@ var templates := [ Template.new(Vector2(512, 480), "SNES (PAL)"), Template.new(Vector2(646, 486), "N64 (NTSC)"), Template.new(Vector2(786, 576), "N64 (PAL)"), - + # Sega Template.new(Vector2(256, 192), "SMS (NTSC)"), Template.new(Vector2(256, 224), "SMS (PAL)"), Template.new(Vector2(160, 144), "GG"), Template.new(Vector2(320, 224), "MD (NTSC)"), Template.new(Vector2(320, 240), "MD (PAL)"), - + # NEC Template.new(Vector2(256, 239), "PC Engine"), #256×224 to 512×242 (mostly 256×239) - + # DOS Template.new(Vector2(320, 200), "DOS EGA"), Template.new(Vector2(320, 200), "DOS VGA"), @@ -47,7 +47,7 @@ var templates := [ Template.new(Vector2(320, 200), "DOS CGA (4-Colour)"), Template.new(Vector2(160, 240), "DOS CGA (Composite)"), Template.new(Vector2(160, 240), "Tandy"), - + # Commodore Template.new(Vector2(320, 200), "Amiga OCS LowRes (NTSC)"), Template.new(Vector2(320, 256), "Amiga OCS LowRes (PAL)"), @@ -57,7 +57,7 @@ var templates := [ Template.new(Vector2(1280, 256), "Amiga ECS SuperHiRes (PAL)"), Template.new(Vector2(640, 480), "Amiga ECS Multiscan"), Template.new(Vector2(320, 200), "C64"), - + # Sinclair Template.new(Vector2(256, 192), "ZX Spectrum"), ] diff --git a/src/UI/Dialogs/PreviewDialog.gd b/src/UI/Dialogs/PreviewDialog.gd index 926c2c7d0..8fbaaf10c 100644 --- a/src/UI/Dialogs/PreviewDialog.gd +++ b/src/UI/Dialogs/PreviewDialog.gd @@ -25,18 +25,18 @@ onready var new_brush_name = $VBoxContainer/HBoxContainer/NewBrushOptions/BrushN func _on_PreviewDialog_about_to_show() -> void: var import_options :OptionButton= get_node("VBoxContainer/HBoxContainer/ImportOption") - + # # order as in ImageImportOptions enum import_options.add_item("New tab") import_options.add_item("Spritesheet (new tab)") import_options.add_item("Spritesheet (new layer)") import_options.add_item("New frame") - import_options.add_item("Replace Frame") + import_options.add_item("Replace frame") import_options.add_item("New layer") import_options.add_item("New palette") import_options.add_item("New brush") import_options.add_item("New pattern") - + var img_texture := ImageTexture.new() img_texture.create_from_image(image, 0) texture_rect.texture = img_texture @@ -117,7 +117,7 @@ func _on_ImportOption_item_selected(id : int) -> void: texture_rect.get_child(0).visible = true texture_rect.get_child(1).visible = true rect_size.x = spritesheet_tab_options.rect_size.x - + elif id == ImageImportOptions.SPRITESHEET_LAYER: frame_size_label.visible = true spritesheet_tab_options.visible = true diff --git a/src/UI/Dialogs/PreviewDialog.tscn b/src/UI/Dialogs/PreviewDialog.tscn index 47ac7c8dc..9cdbb468f 100644 --- a/src/UI/Dialogs/PreviewDialog.tscn +++ b/src/UI/Dialogs/PreviewDialog.tscn @@ -121,19 +121,18 @@ value = 1.0 [node name="SpritesheetLayerOptions" type="HBoxContainer" parent="VBoxContainer/HBoxContainer"] visible = false margin_left = 155.0 -margin_right = 692.0 +margin_right = 307.0 margin_bottom = 24.0 [node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer/SpritesheetLayerOptions"] -margin_left = 382.0 margin_top = 5.0 -margin_right = 459.0 +margin_right = 74.0 margin_bottom = 19.0 -text = "Start Frame:" +text = "Start frame:" [node name="AtFrameSpinbox" type="SpinBox" parent="VBoxContainer/HBoxContainer/SpritesheetLayerOptions"] -margin_left = 463.0 -margin_right = 537.0 +margin_left = 78.0 +margin_right = 152.0 margin_bottom = 24.0 min_value = 1.0 value = 1.0 @@ -160,32 +159,32 @@ max_value = 0.0 [node name="ReplaceFrameOptions" type="HBoxContainer" parent="VBoxContainer/HBoxContainer"] visible = false margin_left = 155.0 -margin_right = 433.0 +margin_right = 427.0 margin_bottom = 24.0 [node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/ReplaceFrameOptions"] margin_top = 5.0 -margin_right = 56.0 +margin_right = 53.0 margin_bottom = 19.0 -text = "At Layer:" +text = "At layer:" [node name="AtLayerSpinbox" type="SpinBox" parent="VBoxContainer/HBoxContainer/ReplaceFrameOptions"] -margin_left = 60.0 -margin_right = 134.0 +margin_left = 57.0 +margin_right = 131.0 margin_bottom = 24.0 mouse_default_cursor_shape = 2 max_value = 0.0 [node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer/ReplaceFrameOptions"] -margin_left = 138.0 +margin_left = 135.0 margin_top = 5.0 -margin_right = 200.0 +margin_right = 194.0 margin_bottom = 19.0 -text = "At Frame:" +text = "At frame:" [node name="AtFrameSpinbox" type="SpinBox" parent="VBoxContainer/HBoxContainer/ReplaceFrameOptions"] -margin_left = 204.0 -margin_right = 278.0 +margin_left = 198.0 +margin_right = 272.0 margin_bottom = 24.0 mouse_default_cursor_shape = 2 min_value = 1.0 @@ -216,19 +215,19 @@ value = 1.0 [node name="NewBrushOptions" type="HBoxContainer" parent="VBoxContainer/HBoxContainer"] visible = false margin_left = 155.0 -margin_right = 471.0 -margin_bottom = 24.0 +margin_right = 324.0 +margin_bottom = 20.0 [node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/NewBrushOptions"] -margin_top = 5.0 +margin_top = 3.0 margin_right = 73.0 -margin_bottom = 19.0 +margin_bottom = 17.0 text = "Brush type:" [node name="BrushTypeOption" type="OptionButton" parent="VBoxContainer/HBoxContainer/NewBrushOptions"] margin_left = 77.0 margin_right = 169.0 -margin_bottom = 24.0 +margin_bottom = 20.0 mouse_default_cursor_shape = 2 text = "File brush" items = [ "File brush", null, false, 0, null, "Project brush", null, false, 1, null, "Random brush", null, false, 2, null ]