From 6edfbad663fd4e74f2b181d51efb28b0cf58291a Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 26 Jan 2021 16:34:25 +0200 Subject: [PATCH] Fixed a bug with the Zoom tool, removed Godot's version check from Tools.gd and updated AboutDialog, CHANGELOG and Translations --- CHANGELOG.md | 3 ++- Translations/Translations.pot | 3 +++ src/Autoload/DrawingAlgos.gd | 2 +- src/Autoload/Tools.gd | 9 ++++----- src/UI/Dialogs/AboutDialog.gd | 2 ++ 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11322dc00..5f7326c75 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 +Laurenz Reinthaler (Schweini07), kleonc, Variable-ind ### Added - A new pan tool, used to move around the canvas. ([#399](https://github.com/Orama-Interactive/Pixelorama/pull/399)) @@ -17,6 +17,7 @@ Laurenz Reinthaler (Schweini07), kleonc - Addet 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. +- 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)) ### 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 1febbe61a..c6eab8563 100644 --- a/Translations/Translations.pot +++ b/Translations/Translations.pot @@ -121,6 +121,9 @@ msgstr "" msgid "Resize Canvas" msgstr "" +msgid "Centralize Image" +msgstr "" + msgid "Rotate Image" msgstr "" diff --git a/src/Autoload/DrawingAlgos.gd b/src/Autoload/DrawingAlgos.gd index 64189407f..4a8ace066 100644 --- a/src/Autoload/DrawingAlgos.gd +++ b/src/Autoload/DrawingAlgos.gd @@ -264,7 +264,7 @@ func centralize() -> void: used_rect = cel_rect if used_rect.has_no_area() else used_rect.merge(cel_rect) if used_rect.has_no_area(): return - + var offset : Vector2 = (0.5 * (Global.current_project.size - used_rect.size)).floor() general_do_centralize() for c in Global.current_project.frames[Global.current_project.current_frame].cels: diff --git a/src/Autoload/Tools.gd b/src/Autoload/Tools.gd index 6ed7e8990..0863cfb40 100644 --- a/src/Autoload/Tools.gd +++ b/src/Autoload/Tools.gd @@ -40,7 +40,7 @@ signal color_changed(color, button) var _tools = { "RectSelect" : "res://src/Tools/RectSelect.tscn", - "Zoom" : "res://src/Tools/Pan.tscn", + "Zoom" : "res://src/Tools/Zoom.tscn", "Pan" : "res://src/Tools/Pan.tscn", "ColorPicker" : "res://src/Tools/ColorPicker.tscn", "Pencil" : "res://src/Tools/Pencil.tscn", @@ -184,10 +184,9 @@ func handle_draw(position : Vector2, event : InputEvent) -> void: _active_button = -1 if event is InputEventMouseMotion: - if Engine.get_version_info().major == 3 && Engine.get_version_info().minor >= 2: - pen_pressure = event.pressure - if Global.pressure_sensitivity_mode == Global.PressureSensitivity.NONE: - pen_pressure = 1.0 + pen_pressure = event.pressure + if Global.pressure_sensitivity_mode == Global.PressureSensitivity.NONE: + pen_pressure = 1.0 if not position.is_equal_approx(_last_position): _last_position = position diff --git a/src/UI/Dialogs/AboutDialog.gd b/src/UI/Dialogs/AboutDialog.gd index de7d5d6f9..cebb3cfa9 100644 --- a/src/UI/Dialogs/AboutDialog.gd +++ b/src/UI/Dialogs/AboutDialog.gd @@ -106,6 +106,7 @@ func create_donors() -> void: donors.create_item(donors_root).set_text(0, " MysteryStudio") donors.create_item(donors_root).set_text(0, " Daniel Gagnon") donors.create_item(donors_root).set_text(0, " Ryan C. Gordon (icculus)") + donors.create_item(donors_root).set_text(0, " Benedikt") func create_contributors() -> void: @@ -139,6 +140,7 @@ func create_contributors() -> void: contributors.create_item(contributor_root).set_text(0, " Vriska Weaver (henlo-birb)") 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, " Variable-ind") func create_translators() -> void: