add plugin system with plugin/layout managers
- plugin_manager: scans res://plugins/*/plugin.cfg, loads tile definitions - plugin_tile: new base class for plugin tiles, extends ModuleBase - layout_manager: save/restore tile grid positions per named layout - migrate existing cpu/memory/testing tiles into system_monitor plugin - add module_resized signal to DashboardGrid for auto-save - dashboard reads from PluginManager + LayoutManager instead of hardcoded paths - project.godot registers PluginManager and LayoutManager autoloads - AGENTS.md updated with new structure and conventions
This commit is contained in:
parent
63af41ea61
commit
f43676e46c
19 changed files with 528 additions and 39 deletions
23
scripts/plugin_tile.gd
Normal file
23
scripts/plugin_tile.gd
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
extends ModuleBase
|
||||
class_name PluginTile
|
||||
## Base class for all plugin tiles.
|
||||
##
|
||||
## Extends ModuleBase with plugin-aware metadata so the system can
|
||||
## correlate tile instances with their definitions and layouts.
|
||||
|
||||
|
||||
var tile_id: String = ""
|
||||
var tile_config: Dictionary = {}
|
||||
|
||||
|
||||
## Called by PluginManager.instantiate_tile() to tag this instance.
|
||||
func set_tile_id(value: String) -> void:
|
||||
tile_id = value
|
||||
|
||||
|
||||
## Called by PluginManager.instantiate_tile() to pass the tile definition.
|
||||
func set_tile_config(config: Dictionary) -> void:
|
||||
tile_config = config
|
||||
# Store in meta so grid/layout can read it on any Control
|
||||
set_meta("tile_id", tile_id)
|
||||
set_meta("tile_config", config)
|
||||
Loading…
Add table
Add a link
Reference in a new issue