From a3e372c5d88ec7329a5302df73c10ac3c0c5c33f Mon Sep 17 00:00:00 2001
From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
Date: Tue, 26 Nov 2024 14:01:45 +0200
Subject: [PATCH 1/3] [skip ci] Update CHANGELOG.md
---
CHANGELOG.md | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f99b5b2e2..9b0bb40da 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). All the dates are in YYYY-MM-DD format.
+## [v1.1] - Unreleased
+This update has been brought to you by the contributions of:
+Fayez Akhtar ([@Variable-ind](https://github.com/Variable-ind))
+
+Built using Godot 4.3
+
+### Added
+- Indexed mode has finally been implemented! [#1136](https://github.com/Orama-Interactive/Pixelorama/pull/1136)
+- Added a new text tool. Destructive only for now, meaning that once the text is confirmed, it cannot be changed later. [#1134](https://github.com/Orama-Interactive/Pixelorama/pull/1134)
+- Implemented support for multiple grids. [#1122](https://github.com/Orama-Interactive/Pixelorama/pull/1122)
+
+### Changed
+- System font names are now sorted by alphabetical order.
+
+### Fixed
+- Fixed crash when Pixelorama starts without a palette.
+- Undo/redo now works again when the cursor is hovering over the timeline.
+- Palette swatches now get deleted when the user removes all palettes
+- Fixed the Palettize effect and palette exporting to images storing slightly wrong color values. [77f6bcf](https://github.com/Orama-Interactive/Pixelorama/commit/77f6bcf07bd80bc042e478bb883d05900cebe436)
+- Fixed some issues with the Palettize effect where the output would be different if the palette size changed and empty swatches were added, even if the colors themselves stayed the same. Initially fixed by [bd7d3b1](https://github.com/Orama-Interactive/Pixelorama/commit/bd7d3b19cc98804e9b99754153c4d553d2048ee3), but [1dcb696](https://github.com/Orama-Interactive/Pixelorama/commit/1dcb696c35121f8208bde699f87bb75deff99d13) is the proper fix.
+- Fixed recorder label not updating when project is changed. [#1139](https://github.com/Orama-Interactive/Pixelorama/pull/1139)
+
## [v1.0.5] - 2024-11-18
This update has been brought to you by the contributions of:
Fayez Akhtar ([@Variable-ind](https://github.com/Variable-ind))
From 41ea287df4edd3deabb65e2adf226a4e799abe7a Mon Sep 17 00:00:00 2001
From: HuanWuCode
Date: Wed, 27 Nov 2024 07:01:00 -0800
Subject: [PATCH 2/3] Update Import.gd (#1121)
---
src/Autoload/Import.gd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Autoload/Import.gd b/src/Autoload/Import.gd
index aa2639810..42606453c 100644
--- a/src/Autoload/Import.gd
+++ b/src/Autoload/Import.gd
@@ -90,9 +90,9 @@ func get_brush_files_from_directory(directory: String): # -> Array
func add_randomised_brush(fpaths: Array, tooltip_name: String) -> void:
# Attempt to load the images from the file paths.
var loaded_images: Array = []
- for filen in fpaths:
+ for file in fpaths:
var image := Image.new()
- var err := image.load(filen)
+ var err := image.load(file)
if err == OK:
image.convert(Image.FORMAT_RGBA8)
loaded_images.append(image)
From 7f4c7a6bf1b01f4118a4de66ee36e5111be3f6fe Mon Sep 17 00:00:00 2001
From: Variable <77773850+Variable-ind@users.noreply.github.com>
Date: Fri, 29 Nov 2024 01:02:13 +0500
Subject: [PATCH 3/3] Grid patch (#1142)
* fix second grid not *shown* removed when first grid has default values.
* Make next added grid twice the previous size, and with a different color
* Formatting
---
src/Autoload/Global.gd | 4 ++
src/Preferences/GridPreferences.gd | 59 ++++++++++++++++++++++++------
2 files changed, 52 insertions(+), 11 deletions(-)
diff --git a/src/Autoload/Global.gd b/src/Autoload/Global.gd
index 01c288bba..38c854a14 100644
--- a/src/Autoload/Global.gd
+++ b/src/Autoload/Global.gd
@@ -752,7 +752,11 @@ func _ready() -> void:
func update_grids(grids_data: Dictionary):
+ # Remove old grids
grids.clear()
+ if is_instance_valid(Global.canvas.grid):
+ Global.canvas.grid.queue_redraw()
+ # ADD new ones
for grid_idx in grids_data.size():
Grid.new(grids_data[grid_idx]) # gets auto added to grids array
diff --git a/src/Preferences/GridPreferences.gd b/src/Preferences/GridPreferences.gd
index 2997222a1..f90d743ce 100644
--- a/src/Preferences/GridPreferences.gd
+++ b/src/Preferences/GridPreferences.gd
@@ -1,5 +1,19 @@
extends GridContainer
+# We should use pre defined initial grid colors instead of random colors
+const INITIAL_GRID_COLORS := [
+ Color.BLACK,
+ Color.WHITE,
+ Color.YELLOW,
+ Color.GREEN,
+ Color.BLUE,
+ Color.GRAY,
+ Color.ORANGE,
+ Color.PINK,
+ Color.SIENNA,
+ Color.CORAL,
+]
+
var grid_preferences: Array[GridPreference] = [
GridPreference.new("grid_type", "GridType", "selected", Global.GridTypes.CARTESIAN),
GridPreference.new("grid_size", "GridSizeValue", "value", Vector2i(2, 2)),
@@ -109,21 +123,42 @@ func _on_grid_pref_value_changed(value, pref: GridPreference, button: RestoreDef
func _on_grids_count_value_changed(value: float) -> void:
- var grid_idx = int(value - 1)
- var grids: Dictionary = Global.config_cache.get_value(
+ var new_grids: Dictionary = Global.config_cache.get_value(
"preferences", "grids", {0: create_default_properties()}
)
- if grid_idx >= grids_select_container.get_child_count():
- for key in range(grids_select_container.get_child_count(), grid_idx + 1):
- if not grids.has(key):
- grids[key] = create_default_properties()
+ var last_grid_idx = int(value - 1)
+ if last_grid_idx >= grids_select_container.get_child_count():
+ # Add missing grids
+ for key in range(grids_select_container.get_child_count(), value):
+ if not new_grids.has(key):
+ var new_grid := create_default_properties()
+ if new_grids.has(key - 1): # Failsafe
+ var last_grid = new_grids[key - 1]
+ # This small bit of code is there to make ui look a little neater
+ # Reasons:
+ # - Usually user intends to make the next grid twice the size.
+ # - Having all grids being same size initially may cause confusion for some
+ # users when they try to change color of a middle grid not seeing it's changing
+ # (due to being covered by grids above it).
+ if (
+ new_grid.has("grid_size")
+ and new_grid.has("isometric_grid_size")
+ and new_grid.has("grid_color")
+ ):
+ new_grid["grid_size"] = last_grid["grid_size"] * 2
+ new_grid["isometric_grid_size"] = last_grid["isometric_grid_size"] * 2
+ if key < INITIAL_GRID_COLORS.size():
+ new_grid["grid_color"] = INITIAL_GRID_COLORS[key]
+ new_grids[key] = new_grid
add_remove_select_button(key)
else:
- for key: int in range(grid_idx + 1, grids.size()):
- grids.erase(key)
+ # Remove extra grids
+ for key: int in range(value, new_grids.size()):
+ new_grids.erase(key)
add_remove_select_button(key, true)
- Global.update_grids(grids)
- Global.config_cache.set_value("preferences", "grids", grids)
+ grid_selected = min(grid_selected, last_grid_idx)
+ Global.update_grids(new_grids)
+ Global.config_cache.set_value("preferences", "grids", new_grids)
func create_default_properties() -> Dictionary:
@@ -152,7 +187,6 @@ func add_remove_select_button(grid_idx: int, remove := false):
else:
if grid_idx < grids_select_container.get_child_count():
grids_select_container.get_child(grid_idx).queue_free()
- grid_selected = min(grid_selected, grid_idx - 1)
func update_pref_ui(grid_data: Dictionary):
@@ -161,3 +195,6 @@ func update_pref_ui(grid_data: Dictionary):
if grid_data.has(key):
var node := get_node(pref.node_path)
node.set(pref.value_type, grid_data[key])
+ if pref.value_type == "color":
+ # the signal doesn't seem to be emitted automatically
+ node.color_changed.emit(grid_data[key])