1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

LightenDarken tool no longer affects transparent pixels

This commit is contained in:
OverloadedOrama 2020-01-12 02:34:47 +02:00
parent 340a885cd7
commit 5562d3f2d5
2 changed files with 8 additions and 4 deletions

View file

@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
- When saving a .pxo file, the file path (along with the file name) gets remembered by the Export PNG file dialog path. (Issue #114)
- LightenDarken tool no longer affects transparent pixels.
- More translatable strings, updates to Greek & Brazilian Portuguese (thanks to YeldhamDev) translations.
- The dark theme button is now pressed by default if the user hasn't saved a theme preference in the config file.
- Added a VSplitContainer for the tools and their options, and another one for Palettes and Layers.
@ -26,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fixed .gpl palettes not being imported correctly - Issue #112
- Fixed crash that occured when pressing the play buttons on the timeline, on Godot 3.2 - Issue #111
- Fixed bug where, if you had a random brush selected and then selected the pencil tool, "brush color from" did not appear.
- Fixed crash on Godot 3.2.beta6 when pressing the Edit Palette button.
## [v0.6] - 06-01-2020

View file

@ -611,10 +611,12 @@ func draw_pixel(pos : Vector2, color : Color, current_mouse_button : String, cur
var current_pixel_color : Color = layers[current_layer_index][0].get_pixel(cur_pos_x, cur_pos_y)
if current_pixel_color != color && !(pos_floored in lighten_darken_pixels):
if current_action == "LightenDarken":
if ld == 0: # Lighten
color = current_pixel_color.lightened(ld_amount)
else:
color = current_pixel_color.darkened(ld_amount)
color = current_pixel_color
if color.a > 0:
if ld == 0: # Lighten
color = current_pixel_color.lightened(ld_amount)
else: # Darken
color = current_pixel_color.darkened(ld_amount)
lighten_darken_pixels.append(pos_floored)
layers[current_layer_index][0].set_pixel(cur_pos_x, cur_pos_y, color)