tblext.gd 409 B

123456789101112131415
  1. @tool
  2. extends EditorPlugin
  3. const config_root_path := 'res://.tbl'
  4. func _enter_tree() -> void:
  5. _setup_panel(preload('editor/config-importer.tscn'))
  6. func _setup_panel(prefab:PackedScene):
  7. var panel := prefab.instantiate()
  8. panel.set('path', config_root_path)
  9. add_control_to_dock(EditorPlugin.DOCK_SLOT_LEFT_BR, panel)
  10. tree_exiting.connect(func():
  11. remove_control_from_docks(panel)
  12. panel.queue_free())