Files
puzzle-quest/addons/godot_db_manager/db_manager.gd
T
Vaillant Jeremy 01ea3af253 Run godot --convert-3to4 (automated conversion)
Apply Godot 4.6 automated conversion: renames Spatial.translate->position,
margin_*->offset_*, tool->@tool, .empty()->.is_empty(), DynamicFont->FontFile,
onready->@onready, export()->@export, and many more.

127 files changed by the tool. Manual fixes still required for:
 - godot_db_manager plugin (incompatible APIs: WindowDialog, Tabs, etc.)
 - lod plugin (Spatial -> Node3D renames)
 - ResourceLoader.load_interactive removed -> load_threaded_request
 - OS.set_window_fullscreen removed -> DisplayServer
 - Viewport.set_size_override removed

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 19:18:27 +02:00

34 lines
939 B
GDScript

@tool
"""
class GDDBManager
"""
class_name GDDBManager
extends EditorPlugin
var DBInterface = preload("./db_interface.tscn")
var db_interface : Node
func _enter_tree():
add_autoload_singleton("gddb_constants", "res://addons/godot_db_manager/core/GDDBConstants.gd")
add_autoload_singleton("gddb_types", "res://addons/godot_db_manager/core/GDDBTypes.gd")
add_autoload_singleton("gddb_globals", "res://addons/godot_db_manager/core/GDDBGlobals.gd")
# Initialization of the plugin goes here
db_interface = DBInterface.instantiate()
get_editor_interface().get_base_control().add_child(db_interface)
add_tool_menu_item("Godot Database Manager", self, "open_config")
func _exit_tree():
# Clean-up of the plugin goes here
remove_tool_menu_item("Godot Database Manager")
if(db_interface):
db_interface.queue_free()
func open_config(UD):
var window = db_interface.get_node("dlg") as Window
if(window):
window.popup_centered()