2023-01-07 20:26:17 +01:00
|
|
|
@tool
|
|
|
|
extends EditorPlugin
|
|
|
|
|
|
|
|
var _bottom_panel = null
|
|
|
|
|
|
|
|
|
|
|
|
func _enter_tree():
|
2023-01-20 23:34:39 +01:00
|
|
|
_bottom_panel = preload("res://addons/gut/gui/GutBottomPanel.tscn").instantiate()
|
2023-01-07 20:26:17 +01:00
|
|
|
|
2023-01-20 23:34:39 +01:00
|
|
|
var button = add_control_to_bottom_panel(_bottom_panel, "GUT")
|
2023-01-07 20:26:17 +01:00
|
|
|
button.shortcut_in_tooltip = true
|
|
|
|
|
|
|
|
await get_tree().create_timer(3).timeout
|
|
|
|
_bottom_panel.set_interface(get_editor_interface())
|
|
|
|
_bottom_panel.set_plugin(self)
|
|
|
|
_bottom_panel.set_panel_button(button)
|
|
|
|
_bottom_panel.load_shortcuts()
|
|
|
|
|
|
|
|
|
|
|
|
func _exit_tree():
|
|
|
|
# Clean-up of the plugin goes here
|
|
|
|
# Always remember to remove_at it from the engine when deactivated
|
|
|
|
remove_control_from_bottom_panel(_bottom_panel)
|
|
|
|
_bottom_panel.free()
|