mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-20 12:33:14 +00:00
DrawingAlgos Explicit Project DataType (#526)
I needed to add the data type to project for the scripts to compile.
This commit is contained in:
parent
680ab481f3
commit
c29254c2e8
1 changed files with 4 additions and 4 deletions
|
@ -302,7 +302,7 @@ func resize_canvas(width : int, height : int, offset_x : int, offset_y : int) ->
|
|||
|
||||
|
||||
func general_do_scale(width : int, height : int) -> void:
|
||||
var project := Global.current_project
|
||||
var project: Project = Global.current_project
|
||||
var size := Vector2(width, height).floor()
|
||||
var x_ratio = project.size.x / width
|
||||
var y_ratio = project.size.y / height
|
||||
|
@ -330,7 +330,7 @@ func general_do_scale(width : int, height : int) -> void:
|
|||
|
||||
|
||||
func general_undo_scale() -> void:
|
||||
var project := Global.current_project
|
||||
var project: Project = Global.current_project
|
||||
project.undo_redo.add_undo_property(project, "size", project.size)
|
||||
project.undo_redo.add_undo_property(project, "selection_bitmap", project.selection_bitmap)
|
||||
project.undo_redo.add_undo_property(project, "x_symmetry_point", project.x_symmetry_point)
|
||||
|
@ -343,13 +343,13 @@ func general_undo_scale() -> void:
|
|||
|
||||
|
||||
func general_do_centralize() -> void:
|
||||
var project := Global.current_project
|
||||
var project: Project = Global.current_project
|
||||
project.undos += 1
|
||||
project.undo_redo.create_action("Centralize")
|
||||
|
||||
|
||||
func general_undo_centralize() -> void:
|
||||
var project := Global.current_project
|
||||
var project: Project = Global.current_project
|
||||
project.undo_redo.add_undo_method(Global, "undo")
|
||||
project.undo_redo.add_do_method(Global, "redo")
|
||||
project.undo_redo.commit_action()
|
||||
|
|
Loading…
Add table
Reference in a new issue