This commit is contained in:
Nicolò Santilio 2020-08-24 13:40:58 +02:00
parent 4281f61086
commit 3759a4b33f

View File

@ -1,33 +0,0 @@
tool
extends EditorPlugin
#var doc = preload("../scenes/FileEditor.tscn")
var IconLoader = preload("res://addons/file-editor/scripts/IconLoader.gd").new()
var FileEditor
func _enter_tree():
add_autoload_singleton("IconLoader","res://addons/file-editor/scripts/IconLoader.gd")
add_autoload_singleton("LastOpenedFiles","res://addons/file-editor/scripts/LastOpenedFiles.gd")
FileEditor = preload("../scenes/FileEditor.tscn").instance()
get_editor_interface().get_editor_viewport().add_child(FileEditor)
FileEditor.hide()
func _exit_tree():
# FileEditor.clean_editor()
remove_autoload_singleton("IconLoader")
remove_autoload_singleton("LastOpenedFiles")
get_editor_interface().get_editor_viewport().remove_child(FileEditor)
func has_main_screen():
return true
func get_plugin_name():
return "File"
func get_plugin_icon():
return IconLoader.load_icon_from_name("file")
func make_visible(visible):
FileEditor.visible = visible