2025-12-31 13:07:31 +08:00
|
|
|
@tool
|
|
|
|
|
extends EditorInspectorPlugin
|
|
|
|
|
|
2026-01-03 23:21:04 +08:00
|
|
|
const SLOT_SCENE:= preload("res://addons/reedscene/act/StateDrapSlot.tscn")
|
2026-01-04 21:21:01 +08:00
|
|
|
const QUICK_CONFIG_SCENE:= preload("res://addons/reedscene/act/StateQuickConfigPanel.tscn")
|
2025-12-31 13:07:31 +08:00
|
|
|
|
|
|
|
|
func _can_handle(object) -> bool:
|
|
|
|
|
return object is ActManager
|
|
|
|
|
|
|
|
|
|
func _parse_begin(object) -> void:
|
2026-01-03 23:21:04 +08:00
|
|
|
var root := VBoxContainer.new()
|
2026-01-04 21:21:01 +08:00
|
|
|
|
|
|
|
|
var am = object as ActManager
|
|
|
|
|
if not am: return
|
|
|
|
|
var rs: ReedScene = am._get_owner_scene()
|
|
|
|
|
if not rs: return
|
|
|
|
|
var size: int = rs.get_prop_count()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var quick_config_panel := QUICK_CONFIG_SCENE.instantiate()
|
|
|
|
|
var info := {
|
|
|
|
|
"size": size
|
|
|
|
|
}
|
|
|
|
|
quick_config_panel.init(info)
|
|
|
|
|
|
|
|
|
|
root.add_child(quick_config_panel)
|
2026-01-03 23:21:04 +08:00
|
|
|
add_custom_control(root)
|