Changed Export PNG settings, moved code from Main.gd to ExportSprites.gd

And made ExportSprites.tscn a scene of its own
This commit is contained in:
OverloadedOrama 2019-12-28 20:30:33 +02:00
parent 04fe708560
commit 67631ac648
7 changed files with 162 additions and 144 deletions

View file

@ -5,7 +5,7 @@ var import_spritesheet := false
var spritesheet_horizontal := 1
var spritesheet_vertical := 1
func _ready():
func _ready() -> void:
var children := []
for i in range(get_child_count()):
if i > 7:
@ -44,7 +44,7 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void:
for path in paths:
var image := Image.new()
var err := image.load(path)
if err != OK: #An error occured
if err != OK: # An error occured
OS.alert("Can't load file")
continue
@ -74,7 +74,7 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void:
else:
var image := Image.new()
var err := image.load(first_path)
if err != OK: #An error occured
if err != OK: # An error occured
OS.alert("Can't load file")
return