mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-30 23:19:49 +00:00
Fixed bug when using a non-pixel brush with Lighten/Darken
If you selected a non-pixel brush with Lighten/Darken, it acted like a regular pencil. Now, no matter what brush you have selected, L/D only works as a pixel brush.
This commit is contained in:
parent
8132c8dcc5
commit
d027923a0e
|
@ -479,8 +479,7 @@ func draw_pixel(pos : Vector2, color : Color, current_mouse_button : String, cur
|
|||
var end_pos_x
|
||||
var end_pos_y
|
||||
|
||||
match(brush_type):
|
||||
Global.BRUSH_TYPES.PIXEL:
|
||||
if brush_type == Global.BRUSH_TYPES.PIXEL || current_action == "LightenDarken":
|
||||
start_pos_x = pos.x - (brush_size >> 1)
|
||||
start_pos_y = pos.y - (brush_size >> 1)
|
||||
end_pos_x = start_pos_x + brush_size
|
||||
|
@ -512,7 +511,7 @@ func draw_pixel(pos : Vector2, color : Color, current_mouse_button : String, cur
|
|||
layers[current_layer_index][0].set_pixel(mirror_x, mirror_y, color)
|
||||
sprite_changed_this_frame = true
|
||||
|
||||
Global.BRUSH_TYPES.FILE, Global.BRUSH_TYPES.CUSTOM:
|
||||
else:
|
||||
var custom_brush_size := custom_brush_image.get_size() - Vector2.ONE
|
||||
pos = pos.floor()
|
||||
var dst := rectangle_center(pos, custom_brush_size)
|
||||
|
|
Loading…
Reference in a new issue