2022-08-23 15:54:28 +02:00
|
|
|
tool
|
|
|
|
extends EditorPlugin
|
|
|
|
|
2022-08-23 20:44:39 +02:00
|
|
|
var web_blog_editor : Control = null
|
|
|
|
|
2022-08-23 16:21:12 +02:00
|
|
|
func _enter_tree():
|
2022-08-23 20:44:39 +02:00
|
|
|
var wbes : PackedScene = ResourceLoader.load("res://addons/web_blog/editor/WebBlogEditor.tscn")
|
|
|
|
web_blog_editor = wbes.instance()
|
2022-08-23 22:06:10 +02:00
|
|
|
web_blog_editor.undo_redo = get_undo_redo()
|
2022-08-23 20:44:39 +02:00
|
|
|
|
|
|
|
var wne : Control = Engine.get_global("WebNodeEditor")
|
|
|
|
if wne:
|
|
|
|
wne.add_main_screen_tab(web_blog_editor)
|
2022-08-23 15:54:28 +02:00
|
|
|
|
2022-08-23 16:21:12 +02:00
|
|
|
func _exit_tree():
|
2022-08-23 20:44:39 +02:00
|
|
|
var wne : Control = Engine.get_global("WebNodeEditor")
|
|
|
|
if wne:
|
|
|
|
wne.remove_main_screen_tab(web_blog_editor)
|
2022-08-23 16:21:12 +02:00
|
|
|
|
2022-08-23 15:54:28 +02:00
|
|
|
func get_plugin_name() -> String:
|
|
|
|
return "WebBlogEditorPlugin"
|