add plugin settings, per-tile refresh, settings menu, touch-friendly UI

- Plugin settings infrastructure in PluginManager with config/plugin_settings.cfg
  storage, manifest [settings] sections, CRUD API, plugin_setting_changed signal
- Per-tile refresh intervals: 100ms base tick, per-tile update_interval_ms
  metadata, dynamic tween durations clamped to refresh window
- Settings menu (PopupPanel) with General/Plugins/About tabs, plugin
  activation toggles, per-plugin settings cog buttons
- Plugin settings popup (PopupPanel) with dynamic UI from setting definitions
  (SpinBox/CheckBox/LineEdit), auto-save on change
- Modal behavior: exclusive = true on settings windows
- Touch-friendly sizing: enlarged close buttons, cog buttons, controls, spacing
- Red corner close button redesign with rounded corners, hover/pressed states
- Split system_monitor into local_system_monitor (CPU, Memory) and test plugins
- Plugin activation/deactivation with layout preservation
This commit is contained in:
Eric Smith 2026-05-21 12:47:25 -04:00
parent 12b45b2685
commit 57b36798b9
24 changed files with 1065 additions and 183 deletions

View file

@ -0,0 +1,49 @@
[plugin]
name="Local System Monitor"
version="0.1.0"
description="Monitors local system resources: CPU and memory"
author="Fifthdread"
[tiles]
count=2
[tile_0]
id="cpu"
name="CPU Monitor"
scene="res://plugins/local_system_monitor/tiles/cpu/cpu_tile.tscn"
min_w=1
min_h=1
max_w=4
max_h=4
default_w=1
default_h=1
[tile_1]
id="memory"
name="Memory Monitor"
scene="res://plugins/local_system_monitor/tiles/memory/memory_tile.tscn"
min_w=1
min_h=1
max_w=4
max_h=4
default_w=1
default_h=1
[settings]
count=2
[setting_0]
key="cpu_update_interval_ms"
label="CPU Update Interval"
type="int"
default=1000
min=100
max=60000
[setting_1]
key="memory_update_interval_ms"
label="Memory Update Interval"
type="int"
default=1000
min=100
max=60000

View file

@ -25,12 +25,14 @@ func refresh(data: Dictionary) -> void:
var pct: int = roundi(usage)
label.text = "%d%%" % pct
# Smoothly tween the vial fill
# Smoothly tween the vial fill — clamp duration so animation never outlasts the refresh interval
var target: float = usage / 100.0
var update_ms: int = data.get("update_interval_ms", 1000)
var duration: float = minf(0.4, update_ms / 2000.0)
if _fill_tween and _fill_tween.is_valid():
_fill_tween.kill()
_fill_tween = create_tween()
_fill_tween.tween_method(_set_fill, _displayed_fill, target, 0.4).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_CUBIC)
_fill_tween.tween_method(_set_fill, _displayed_fill, target, duration).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_CUBIC)
func _set_fill(value: float) -> void:

View file

@ -1,6 +1,6 @@
[gd_scene format=3 uid="uid://bq3bs2hb4r7fb"]
[ext_resource type="Script" path="res://plugins/system_monitor/tiles/cpu/cpu_tile.gd" id="1"]
[ext_resource type="Script" path="res://plugins/local_system_monitor/tiles/cpu/cpu_tile.gd" id="1"]
[ext_resource type="Shader" path="res://shaders/vial_fill.gdshader" id="2"]
[node name="CpuTile" type="PanelContainer"]

View file

@ -25,12 +25,14 @@ func refresh(data: Dictionary) -> void:
var pct: int = roundi(usage)
label.text = "%d%%" % pct
# Smoothly tween the vial fill
# Smoothly tween the vial fill — clamp duration so animation never outlasts the refresh interval
var target: float = usage / 100.0
var update_ms: int = data.get("update_interval_ms", 1000)
var duration: float = minf(0.4, update_ms / 2000.0)
if _fill_tween and _fill_tween.is_valid():
_fill_tween.kill()
_fill_tween = create_tween()
_fill_tween.tween_method(_set_fill, _displayed_fill, target, 0.4).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_CUBIC)
_fill_tween.tween_method(_set_fill, _displayed_fill, target, duration).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_CUBIC)
func _set_fill(value: float) -> void:

View file

@ -1,6 +1,6 @@
[gd_scene format=3 uid="uid://d2d4uqrd2hh3d"]
[ext_resource type="Script" path="res://plugins/system_monitor/tiles/memory/memory_tile.gd" id="1"]
[ext_resource type="Script" path="res://plugins/local_system_monitor/tiles/memory/memory_tile.gd" id="1"]
[ext_resource type="Shader" path="res://shaders/vial_fill.gdshader" id="2"]
[node name="MemoryTile" type="PanelContainer"]

View file

@ -1,41 +0,0 @@
[plugin]
name="System Monitor"
version="1.0.0"
description="Monitors system resources: CPU and memory usage"
author="Fifthdread"
[tiles]
count=3
[tile_0]
id="cpu"
name="CPU Monitor"
scene="res://plugins/system_monitor/tiles/cpu/cpu_tile.tscn"
min_w=1
min_h=1
max_w=4
max_h=4
default_w=1
default_h=1
[tile_1]
id="memory"
name="Memory Monitor"
scene="res://plugins/system_monitor/tiles/memory/memory_tile.tscn"
min_w=1
min_h=1
max_w=4
max_h=4
default_w=1
default_h=1
[tile_2]
id="testing"
name="Testing"
scene="res://plugins/system_monitor/tiles/testing/testing_tile.tscn"
min_w=1
min_h=1
max_w=4
max_h=4
default_w=1
default_h=1

30
plugins/test/plugin.cfg Normal file
View file

@ -0,0 +1,30 @@
[plugin]
name="Test"
version="0.1.0"
description="Development testing tiles and framework experiments"
author="Fifthdread"
[tiles]
count=1
[tile_0]
id="testing"
name="Testing"
scene="res://plugins/test/tiles/testing/testing_tile.tscn"
min_w=1
min_h=1
max_w=4
max_h=4
default_w=1
default_h=1
[settings]
count=1
[setting_0]
key="testing_update_interval_ms"
label="Testing Update Interval"
type="int"
default=1000
min=100
max=60000

View file

@ -17,16 +17,19 @@ func initialize() -> void:
_style()
func refresh(_data: Dictionary) -> void:
func refresh(data: Dictionary) -> void:
_cycle = (_cycle + 1) % _levels.size()
var target: float = _levels[_cycle]
label.text = "%d%%" % roundi(target * 100.0)
# Clamp duration so animation never outlasts the refresh interval
var update_ms: int = data.get("update_interval_ms", 1000)
var duration: float = minf(0.6, update_ms / 1500.0)
if _fill_tween and _fill_tween.is_valid():
_fill_tween.kill()
_fill_tween = create_tween()
_fill_tween.tween_method(_set_fill, _displayed_fill, target, 0.6).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_CUBIC)
_fill_tween.tween_method(_set_fill, _displayed_fill, target, duration).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_CUBIC)
func _set_fill(value: float) -> void:

View file

@ -1,6 +1,6 @@
[gd_scene format=3]
[ext_resource type="Script" path="res://plugins/system_monitor/tiles/testing/testing_tile.gd" id="1"]
[ext_resource type="Script" path="res://plugins/test/tiles/testing/testing_tile.gd" id="1"]
[ext_resource type="Shader" path="res://shaders/vial_fill.gdshader" id="2"]
[node name="TestingTile" type="PanelContainer"]