mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-12-18 22:54:43 -05:00
* Add request #276 * Remove a warning message * Some fixes * Bug fix. Remove Global.save_project_to_recent_list() from src/Main.gd Co-authored-by: Daniel Simon <dasimon@gmx.org>
This commit is contained in:
parent
d85efce73a
commit
7126074a0e
5 changed files with 76 additions and 4 deletions
15
src/Main.gd
15
src/Main.gd
|
|
@ -143,6 +143,21 @@ func load_last_project() -> void:
|
|||
Global.dialog_open(true)
|
||||
|
||||
|
||||
func load_recent_project_file(path : String) -> void:
|
||||
if OS.get_name() == "HTML5":
|
||||
return
|
||||
|
||||
# Check if file still exists on disk
|
||||
var file_check := File.new()
|
||||
if file_check.file_exists(path): # If yes then load the file
|
||||
OpenSave.handle_loading_files([path])
|
||||
else:
|
||||
# If file doesn't exist on disk then warn user about this
|
||||
Global.error_dialog.set_text("Cannot find project file.")
|
||||
Global.error_dialog.popup_centered()
|
||||
Global.dialog_open(true)
|
||||
|
||||
|
||||
func _on_OpenSprite_file_selected(path : String) -> void:
|
||||
OpenSave.handle_loading_files([path])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue