mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Merge pull request #29 from azagaya/master
Don't draw blue rectangle arround selected pixel when picking color
This commit is contained in:
commit
3fd2df11e8
|
@ -370,7 +370,7 @@ func _draw() -> void:
|
||||||
var mouse_pos := get_local_mouse_position() + location
|
var mouse_pos := get_local_mouse_position() + location
|
||||||
if point_in_rectangle(mouse_pos, location, location + size):
|
if point_in_rectangle(mouse_pos, location, location + size):
|
||||||
mouse_pos = mouse_pos.floor()
|
mouse_pos = mouse_pos.floor()
|
||||||
if Global.left_square_indicator_visible:
|
if Global.left_square_indicator_visible and Global.can_draw:
|
||||||
match Global.current_left_brush_type:
|
match Global.current_left_brush_type:
|
||||||
Global.BRUSH_TYPES.PIXEL:
|
Global.BRUSH_TYPES.PIXEL:
|
||||||
var start_pos_x = mouse_pos.x - (Global.left_brush_size >> 1)
|
var start_pos_x = mouse_pos.x - (Global.left_brush_size >> 1)
|
||||||
|
@ -381,7 +381,7 @@ func _draw() -> void:
|
||||||
var dst := rectangle_center(mouse_pos, custom_brush_size)
|
var dst := rectangle_center(mouse_pos, custom_brush_size)
|
||||||
draw_texture(Global.custom_left_brush_texture, dst)
|
draw_texture(Global.custom_left_brush_texture, dst)
|
||||||
|
|
||||||
if Global.right_square_indicator_visible:
|
if Global.right_square_indicator_visible and Global.can_draw:
|
||||||
match Global.current_right_brush_type:
|
match Global.current_right_brush_type:
|
||||||
Global.BRUSH_TYPES.PIXEL:
|
Global.BRUSH_TYPES.PIXEL:
|
||||||
var start_pos_x = mouse_pos.x - (Global.right_brush_size >> 1)
|
var start_pos_x = mouse_pos.x - (Global.right_brush_size >> 1)
|
||||||
|
|
Loading…
Reference in a new issue