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:
Eric Smith 2026-05-21 08:39:15 -04:00
parent 63af41ea61
commit f43676e46c
19 changed files with 528 additions and 39 deletions

View file

@ -5,6 +5,7 @@ class_name DashboardGrid
signal module_placed(module: Control, col: int, row: int)
signal module_removed(module: Control)
signal module_resized(module: Control, col: int, row: int, w: int, h: int)
@export var cell_min_size: Vector2 = Vector2(300, 240)
@export var cell_spacing: float = 8.0
@ -161,6 +162,12 @@ func remove_module(module: Control) -> void:
_layout_cells()
func get_module_at(col: int, row: int) -> Control:
if not _is_valid_cell(col, row):
return null
return _grid[row][col] as Control
func get_grid_size() -> Vector2i:
return Vector2i(columns, rows)
@ -421,6 +428,7 @@ func _end_resize(_mouse_pos: Vector2) -> void:
_set_module_grid_data(_resize_module, _resize_origin_col, _resize_origin_row, _resize_origin_w, _resize_origin_h)
_occupy_cells(_resize_module, _resize_origin_col, _resize_origin_row, _resize_origin_w, _resize_origin_h)
_layout_cells()
module_resized.emit(_resize_module, _resize_origin_col, _resize_origin_row, _resize_origin_w, _resize_origin_h)
_is_resizing = false
_resize_module = null