mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 15:54:44 -04:00
Pattern filling - Partially addresses #130
If the user chooses a brush that is not the pixel or a circle brush and uses the bucket tool, the brush image is used as a pattern that fills the area.
This commit is contained in:
parent
61c4ea7aa1
commit
e072b95727
3 changed files with 102 additions and 23 deletions
|
@ -10,12 +10,13 @@ func _on_BrushButton_pressed() -> void:
|
|||
if Input.is_action_just_released("middle_mouse"):
|
||||
_on_DeleteButton_pressed()
|
||||
return
|
||||
|
||||
# Change left brush
|
||||
if Global.brush_type_window_position == "left":
|
||||
Global.current_left_brush_type = brush_type
|
||||
Global.custom_left_brush_index = custom_brush_index
|
||||
if custom_brush_index > -1: # Custom brush
|
||||
if Global.current_left_tool == "Pencil":
|
||||
if Global.current_left_tool == "Pencil" or Global.current_left_tool == "Bucket":
|
||||
Global.left_color_interpolation_container.visible = true
|
||||
# if hint_tooltip == "":
|
||||
# Global.left_brush_type_label.text = tr("Custom brush")
|
||||
|
@ -37,7 +38,7 @@ func _on_BrushButton_pressed() -> void:
|
|||
Global.current_right_brush_type = brush_type
|
||||
Global.custom_right_brush_index = custom_brush_index
|
||||
if custom_brush_index > -1:
|
||||
if Global.current_right_tool == "Pencil":
|
||||
if Global.current_right_tool == "Pencil" or Global.current_right_tool == "Bucket":
|
||||
Global.right_color_interpolation_container.visible = true
|
||||
# if hint_tooltip == "":
|
||||
# Global.right_brush_type_label.text = tr("Custom brush")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue