mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-20 12:33:14 +00:00
Opening .pxo files directly with Pixelorama is now also supported
Also added "-> void" to the methods that did not already have it
This commit is contained in:
parent
45a31faa7b
commit
9e7a3059f2
5 changed files with 25 additions and 20 deletions
|
@ -9,13 +9,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- Image layer rotation! Choose between 2 rotation algorithms, Rotxel and Nearest Neighbour - Thanks to azagaya!
|
||||
- Tablet pen pressure sensitivity!
|
||||
- Crowdin integration for contributing translations!
|
||||
- Spanish translation - thanks to azagaya!
|
||||
- Spanish translation - thanks to azagaya & Lilly And!
|
||||
- Chinese Simplified translation - thanks to wcxu21!
|
||||
- Translators can now be seen in the About window.
|
||||
- It is now possible to remove custom brushes with the middle mouse button.
|
||||
- Added HSV mode to the color picker. (Added automatically because of the Godot 3.2 update)
|
||||
- Lanczos scaling interpolation. (Added because of the Godot 3.2 update)
|
||||
- You can now drag and drop (or right click and open with) image files in Pixelorama.
|
||||
- You can now drag and drop (or right click and open with) image and .pxo files in Pixelorama.
|
||||
|
||||
### Changed
|
||||
- Major changes to alpha blending behavior. The alpha values now get added/blended together instead of just replacing the pixel with the new value.
|
||||
|
@ -29,7 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- Translation updates.
|
||||
|
||||
### Fixed
|
||||
- Delay the splash screen popup so it shows properly centered (thanks to YeldhamDev)
|
||||
- Delay the splash screen popup so it shows properly centered - Thanks to YeldhamDev
|
||||
- Possibly fixed crashes with motion drawing and undo/redoing.
|
||||
- Fixed bug (which also caused crashes sometimes) when generating an outline inside the image and it was going outside the canvas' borders.
|
||||
- Fixed crash when importing images that were failing to load. They still fail to load, but Pixelorama does not crash.
|
||||
|
|
|
@ -4,21 +4,21 @@ var texture : ImageTexture
|
|||
var aux_img : Image
|
||||
var layer : Image
|
||||
|
||||
func _ready():
|
||||
func _ready() -> void:
|
||||
texture = ImageTexture.new()
|
||||
texture.flags = 0
|
||||
aux_img = Image.new()
|
||||
$VBoxContainer/HBoxContainer2/OptionButton.add_item("Rotxel")
|
||||
$VBoxContainer/HBoxContainer2/OptionButton.add_item("Nearest neighbour")
|
||||
|
||||
func set_sprite(sprite : Image):
|
||||
func set_sprite(sprite : Image) -> void:
|
||||
aux_img.copy_from(sprite)
|
||||
layer = sprite
|
||||
texture.create_from_image(aux_img, 0)
|
||||
$VBoxContainer/TextureRect.texture = texture
|
||||
|
||||
|
||||
func _on_HSlider_value_changed(_value):
|
||||
func _on_HSlider_value_changed(_value) -> void:
|
||||
rotate()
|
||||
$VBoxContainer/HBoxContainer/SpinBox.value = $VBoxContainer/HBoxContainer/HSlider.value
|
||||
|
||||
|
@ -27,7 +27,7 @@ func _on_SpinBox_value_changed(_value):
|
|||
$VBoxContainer/HBoxContainer/HSlider.value = $VBoxContainer/HBoxContainer/SpinBox.value
|
||||
|
||||
|
||||
func _on_RotateImage_confirmed():
|
||||
func _on_RotateImage_confirmed() -> void:
|
||||
Global.canvas.handle_undo("Draw")
|
||||
match $VBoxContainer/HBoxContainer2/OptionButton.text:
|
||||
"Rotxel":
|
||||
|
@ -37,7 +37,7 @@ func _on_RotateImage_confirmed():
|
|||
Global.canvas.handle_redo("Draw")
|
||||
$VBoxContainer/HBoxContainer/HSlider.value = 0
|
||||
|
||||
func rotate():
|
||||
func rotate() -> void:
|
||||
var sprite : Image = Image.new()
|
||||
sprite.copy_from(aux_img)
|
||||
match $VBoxContainer/HBoxContainer2/OptionButton.text:
|
||||
|
@ -48,9 +48,9 @@ func rotate():
|
|||
texture.create_from_image(sprite, 0)
|
||||
|
||||
|
||||
func _on_OptionButton_item_selected(_id):
|
||||
func _on_OptionButton_item_selected(_id) -> void:
|
||||
rotate()
|
||||
|
||||
|
||||
func _on_RotateImage_about_to_show():
|
||||
func _on_RotateImage_about_to_show() -> void:
|
||||
$VBoxContainer/HBoxContainer/HSlider.value = 0
|
||||
|
|
|
@ -15,9 +15,6 @@ func _ready() -> void:
|
|||
remove_child(child)
|
||||
get_vbox().add_child(child)
|
||||
|
||||
if OS.get_cmdline_args():
|
||||
_on_ImportSprites_files_selected(OS.get_cmdline_args())
|
||||
|
||||
func _on_ImportAsNewFrame_pressed() -> void:
|
||||
new_frame = !new_frame
|
||||
|
||||
|
|
|
@ -672,7 +672,7 @@ func scale3X(sprite : Image, tol : float = 50) -> Image:
|
|||
sprite.unlock()
|
||||
return scaled
|
||||
|
||||
func rotxel(sprite : Image, angle : float):
|
||||
func rotxel(sprite : Image, angle : float) -> void:
|
||||
|
||||
# If angle is simple, then nn rotation is the best
|
||||
|
||||
|
@ -783,7 +783,7 @@ func rotxel(sprite : Image, angle : float):
|
|||
sprite.unlock()
|
||||
aux.unlock()
|
||||
|
||||
func nn_rotate(sprite : Image, angle : float):
|
||||
func nn_rotate(sprite : Image, angle : float) -> void:
|
||||
var aux : Image = Image.new()
|
||||
aux.copy_from(sprite)
|
||||
sprite.lock()
|
||||
|
|
|
@ -152,6 +152,19 @@ func _ready() -> void:
|
|||
Global.left_color_picker.get_picker().move_child(Global.left_color_picker.get_picker().get_child(0), 1)
|
||||
Global.right_color_picker.get_picker().move_child(Global.right_color_picker.get_picker().get_child(0), 1)
|
||||
|
||||
if OS.get_cmdline_args():
|
||||
for arg in OS.get_cmdline_args():
|
||||
print(arg)
|
||||
if arg.get_extension().to_lower() == "pxo":
|
||||
_on_OpenSprite_file_selected(arg)
|
||||
else:
|
||||
$ImportSprites._on_ImportSprites_files_selected([arg])
|
||||
|
||||
OS.set_window_title("(" + tr("untitled") + ") - Pixelorama")
|
||||
|
||||
Global.canvas.layers[0][2] = tr("Layer") + " 0"
|
||||
Global.canvas.generate_layer_panels()
|
||||
|
||||
Import.import_brushes("Brushes")
|
||||
|
||||
if not Global.config_cache.has_section_key("preferences", "startup"):
|
||||
|
@ -159,11 +172,6 @@ func _ready() -> void:
|
|||
if not Global.config_cache.get_value("preferences", "startup"):
|
||||
$SplashDialog.hide()
|
||||
|
||||
OS.set_window_title("(" + tr("untitled") + ") - Pixelorama")
|
||||
|
||||
Global.canvas.layers[0][2] = tr("Layer") + " 0"
|
||||
Global.canvas.generate_layer_panels()
|
||||
|
||||
# Wait for the window to adjust itself, so the popup is correctly centered
|
||||
yield(get_tree().create_timer(0.01), "timeout")
|
||||
$SplashDialog.popup_centered() # Splash screen
|
||||
|
|
Loading…
Add table
Reference in a new issue