mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 13:44:42 -04:00
Project brushes change when switching projects
A new Global.file_brushes array is used for the file brushes, and the Project class has its own brushes array for the project brushes
This commit is contained in:
parent
736521246d
commit
4af130bc61
7 changed files with 67 additions and 63 deletions
|
@ -15,8 +15,6 @@ var animation_tags := [] setget animation_tags_changed # Array of AnimationTags
|
|||
var guides := [] # Array of Guides
|
||||
|
||||
var brushes := [] # Array of Images
|
||||
var brush_images := [Image.new(), Image.new()]
|
||||
var brush_textures := [ImageTexture.new(), ImageTexture.new()]
|
||||
|
||||
var selected_pixels := []
|
||||
var x_min := 0
|
||||
|
@ -103,6 +101,7 @@ func change_project() -> void:
|
|||
Global.selection_rectangle.polygon[2] = Vector2.ZERO
|
||||
Global.selection_rectangle.polygon[3] = Vector2.ZERO
|
||||
|
||||
# Change the guides
|
||||
for guide in Global.canvas.get_children():
|
||||
if guide is Guide:
|
||||
if guide in guides:
|
||||
|
@ -110,6 +109,13 @@ func change_project() -> void:
|
|||
else:
|
||||
guide.visible = false
|
||||
|
||||
# Change the project brushes
|
||||
for child in Global.project_brush_container.get_children():
|
||||
child.queue_free()
|
||||
|
||||
for brush in brushes:
|
||||
Global.create_brush_button(brush)
|
||||
|
||||
|
||||
func frames_changed(value : Array) -> void:
|
||||
frames = value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue