mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 19:34:43 -04:00
Added sliders for brush size & 2 new custom brushes
Also, in Canvas.gd's _draw() method, draw_set_transform() is called again after the circle brush drawings, to reset the transform to its default state.
This commit is contained in:
parent
06e0d74c14
commit
d4b42534bb
6 changed files with 39 additions and 8 deletions
|
@ -450,9 +450,10 @@ func _draw() -> void:
|
|||
draw_rect(Rect2(start_pos_x, start_pos_y, Global.left_brush_size, Global.left_brush_size), Color.blue, false)
|
||||
elif Global.current_left_brush_type == Global.BRUSH_TYPES.CIRCLE:
|
||||
if Global.current_left_tool == "Pencil" || Global.current_left_tool == "Eraser":
|
||||
draw_set_transform(mouse_pos, 0, Vector2.ONE)
|
||||
draw_set_transform(mouse_pos, rotation, scale)
|
||||
for rect in Global.left_circle_points:
|
||||
draw_rect(Rect2(rect, Vector2.ONE), Color.blue, false)
|
||||
draw_set_transform(position, rotation, scale)
|
||||
else:
|
||||
if Global.current_left_tool == "Pencil" || Global.current_left_tool == "Eraser":
|
||||
var custom_brush_size = Global.custom_left_brush_image.get_size() - Vector2.ONE
|
||||
|
@ -467,9 +468,10 @@ func _draw() -> void:
|
|||
draw_rect(Rect2(start_pos_x, start_pos_y, Global.right_brush_size, Global.right_brush_size), Color.red, false)
|
||||
elif Global.current_right_brush_type == Global.BRUSH_TYPES.CIRCLE:
|
||||
if Global.current_right_tool == "Pencil" || Global.current_right_tool == "Eraser":
|
||||
draw_set_transform(mouse_pos, 0, Vector2.ONE)
|
||||
draw_set_transform(mouse_pos, rotation, scale)
|
||||
for rect in Global.right_circle_points:
|
||||
draw_rect(Rect2(rect, Vector2.ONE), Color.red, false)
|
||||
draw_set_transform(position, rotation, scale)
|
||||
else:
|
||||
if Global.current_right_tool == "Pencil" || Global.current_right_tool == "Eraser":
|
||||
var custom_brush_size = Global.custom_right_brush_image.get_size() - Vector2.ONE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue