broken_seals_2ds/game/addons/Godoxel/plugin.gd

38 lines
893 B
GDScript3
Raw Normal View History

2022-01-30 23:20:50 +01:00
tool
extends EditorPlugin
var editor_scene = load("res://addons/Godoxel/Editor.tscn").instance()
func _enter_tree():
editor_scene.name = "Editor"
if get_editor_interface().get_editor_viewport().has_node("Editor"):
var n = get_editor_interface().get_editor_viewport().get_node("Editor")
n.name = "EditorDel"
n.queue_free()
get_editor_interface().get_editor_viewport().add_child(editor_scene, true)
editor_scene.owner = get_editor_interface().get_editor_viewport()
make_visible(false)
func _exit_tree():
if editor_scene:
editor_scene.queue_free()
func has_main_screen():
return true
func make_visible(visible):
if editor_scene:
editor_scene.visible = visible
func get_plugin_name():
return "Paint"
2022-01-30 23:20:50 +01:00
func get_plugin_icon():
# Must return some kind of Texture for the icon.
return get_editor_interface().get_base_control().get_icon("CanvasModulate", "EditorIcons")