mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 15:44:42 -04:00
Brushes now get removed when opening a project, indicators for chosen sprites
- If you had custom brushes in your project and you opened a new one (from a .pxo file), the brushes would stack. Now, the previous brushes get removed. - Added arrow left and right indicators for the selected brushes.
This commit is contained in:
parent
be6f9121ed
commit
eb29cd3268
5 changed files with 66 additions and 43 deletions
|
@ -6,12 +6,16 @@ var custom_brush_index := -1
|
|||
func _on_BrushButton_pressed() -> void:
|
||||
if Input.is_action_just_released("left_mouse"):
|
||||
Global.current_left_brush_type = brush_type
|
||||
Global.left_brush_indicator.get_parent().remove_child(Global.left_brush_indicator)
|
||||
add_child(Global.left_brush_indicator)
|
||||
if custom_brush_index > -1:
|
||||
Global.custom_left_brush_index = custom_brush_index
|
||||
Global.update_left_custom_brush()
|
||||
|
||||
elif Input.is_action_just_released("right_mouse"):
|
||||
Global.current_right_brush_type = brush_type
|
||||
Global.right_brush_indicator.get_parent().remove_child(Global.right_brush_indicator)
|
||||
add_child(Global.right_brush_indicator)
|
||||
if custom_brush_index > -1:
|
||||
Global.custom_right_brush_index = custom_brush_index
|
||||
Global.update_right_custom_brush()
|
Loading…
Add table
Add a link
Reference in a new issue