mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 06:44:42 -04:00
LightenDarken tool no longer affects transparent pixels
This commit is contained in:
parent
340a885cd7
commit
5562d3f2d5
2 changed files with 8 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue