## 游戏设计器主面板 — TabContainer 整合 法术/敌人/波次/Core/平衡 五个编辑器
@tool
extends Control

func _init() -> void:
	custom_minimum_size = Vector2(0, 320)
	var tabs := TabContainer.new()
	tabs.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
	add_child(tabs)

	# 法术（字段化表单 tab）
	_add_tab(tabs, "✨ 法术", preload("res://addons/game_designer/spell_tab.gd").new())
	_add_tab(tabs, "👾 敌人", preload("res://addons/game_designer/enemy_tab.gd").new())
	_add_tab(tabs, "🌊 波次", preload("res://addons/game_designer/wave_tab.gd").new())
	_add_tab(tabs, "🪄 Core", preload("res://addons/game_designer/core_tab.gd").new())
	_add_tab(tabs, "🔮 共鸣", preload("res://addons/game_designer/resonance_tab.gd").new())
	_add_tab(tabs, "🔥 状态", preload("res://addons/game_designer/status_tab.gd").new())
	_add_tab(tabs, "👑 Boss", preload("res://addons/game_designer/boss_tab.gd").new())
	_add_tab(tabs, "⚖ 平衡", preload("res://addons/game_designer/balance_tab.gd").new())

func _add_tab(tabs: TabContainer, title: String, content: Control) -> void:
	var scroll := ScrollContainer.new()
	scroll.name = title
	scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
	content.size_flags_horizontal = Control.SIZE_EXPAND_FILL
	scroll.add_child(content)
	tabs.add_child(scroll)
