mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-30 23:04:43 -04:00
Created a Projects class
A Project class contains project-specific data like name, undo_redo, frames, layers, tags and brushes. These variables have been moved from Global. This is the first step towards multiple tab support, where each tab will be a different Project.
This commit is contained in:
parent
9d38cbd13e
commit
4e111a7ac0
21 changed files with 656 additions and 627 deletions
|
@ -23,7 +23,7 @@ func _ready() -> void:
|
|||
|
||||
|
||||
func _on_HSVDialog_about_to_show() -> void:
|
||||
current_cel = Global.frames[Global.current_frame].cels[Global.current_layer].image
|
||||
current_cel = Global.current_project.frames[Global.current_project.current_frame].cels[Global.current_project.current_layer].image
|
||||
preview_image.copy_from(current_cel)
|
||||
update_preview()
|
||||
|
||||
|
@ -38,7 +38,7 @@ func _on_Apply_pressed() -> void:
|
|||
DrawingAlgos.adjust_hsv(current_cel,0,hue_slider.value)
|
||||
DrawingAlgos.adjust_hsv(current_cel,1,sat_slider.value)
|
||||
DrawingAlgos.adjust_hsv(current_cel,2,val_slider.value)
|
||||
Global.canvas.update_texture(Global.current_layer)
|
||||
Global.canvas.update_texture(Global.current_project.current_layer)
|
||||
Global.canvas.handle_redo("Draw")
|
||||
reset()
|
||||
visible = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue