docs: update AGENTS.md and README with splash/config changes
This commit is contained in:
parent
75b9f8cf7b
commit
63af41ea61
2 changed files with 31 additions and 5 deletions
32
AGENTS.md
32
AGENTS.md
|
|
@ -52,26 +52,50 @@ V Panel is a Godot Engine project that builds a fancy real-time status monitor.
|
|||
- `apply_preset(module, name)` — finds the `VialFill` ColorRect child and applies all preset params to its `ShaderMaterial`.
|
||||
- `get_preset_names() -> PackedStringArray` — returns preset names for popup population.
|
||||
|
||||
### Font Size Animation (Splash)
|
||||
- `Control.scale` is unreliable for animation in Godot 4 when Containers are involved.
|
||||
- `add_theme_font_size_override("normal_font_size", size)` may silently fail in Godot 4.6+ because `"normal_font_size"` is a deprecated alias. Use `label.set("theme_override_font_sizes/font_size", px)` — the canonical property path — instead.
|
||||
- `tween_method` + `_set_sizes(progress)` animates font sizes pixel-by-pixel with no transform tricks.
|
||||
|
||||
### Labels / Readability
|
||||
- All percentage labels get a 3px black outline (`outline_size` / `font_outline_color`) for legibility against the liquid shader background.
|
||||
- Title labels get a 2px outline.
|
||||
|
||||
### Config System
|
||||
- `autoload/config_manager.gd` — autoload singleton using Godot's built-in `ConfigFile` class for INI-style config files.
|
||||
- Two files: `res://config/default.cfg` (shipped defaults, tracked) and `res://config/config.cfg` (user overrides, gitignored). User overrides are merged on top of defaults per-key.
|
||||
- Keys are flattened as `{section}_{key}` for simple `get_setting(key, default)` lookups (e.g., `[background]` + `color` => `"background_color"`).
|
||||
- `get_color(key, default_color)` parses `"r, g, b"` string values from config into `Color`.
|
||||
- `set_setting(key, value)` diffs against defaults and writes only the diff to `config.cfg` automatically.
|
||||
|
||||
### Splash Screen
|
||||
- `scenes/splash.tscn` + `scenes/splash.gd` — entry point (set in `project.godot` as `main_scene`), handles fullscreen, font-size zoom animation, crossfade to dashboard.
|
||||
- Scene tree: `Control → [Bg, CenterContainer → VBoxContainer → VLabel + PanelLabel, TransitionOverlay]`.
|
||||
- Flow: Black overlay reveal (0.4s) → font-size animation with TRANS_BACK overshoot (2s) + parallel fade-in (1.8s) → hold (1s) → splash text fades out (1s, EASE_IN) → dashboard instantiated and fades in (1s, EASE_OUT) → reparent to root, queue_free splash.
|
||||
- Dashboard background (`PanelContainer`) and splash background (`ColorRect`) both read from `ConfigManager.get_color("background_color")` for a seamless crossfade — no fade-to-black transition.
|
||||
|
||||
### Project Structure
|
||||
```
|
||||
res://
|
||||
├── addons/ # Third-party plugins
|
||||
├── assets/ # Fonts, icons, textures, audio
|
||||
│ ├── fonts/
|
||||
│ ├── fonts/ # Orbitron.ttf (variable weight)
|
||||
│ ├── icons/
|
||||
│ └── textures/ # noise_100.png (static noise for shader distortion)
|
||||
│ └── textures/ # noise_100.png (tileable Perlin noise for shader distortion)
|
||||
├── autoload/ # Singleton/autoload scripts
|
||||
│ └── config_manager.gd # INI config via ConfigFile
|
||||
├── config/ # Configuration files (INI format)
|
||||
│ ├── default.cfg # Shipped defaults, tracked in git
|
||||
│ └── config.cfg # User overrides, gitignored (auto-generated)
|
||||
├── panels/ # Individual status panels (modules)
|
||||
│ ├── cpu/
|
||||
│ ├── memory/
|
||||
│ ├── network/
|
||||
│ ├── disk/
|
||||
│ └── testing/
|
||||
├── scenes/ # Root scenes (dashboard, etc.)
|
||||
├── scenes/ # Root scenes
|
||||
│ ├── splash.tscn # Animated splash → dashboard transition
|
||||
│ └── dashboard.tscn # Main dashboard (PanelContainer root)
|
||||
├── scripts/ # Shared utility scripts
|
||||
│ ├── dashboard_grid.gd # Responsive grid with drag, resize, preset popup
|
||||
│ ├── module_base.gd # Base class for all modules (mouse_filter IGNORE)
|
||||
|
|
@ -80,7 +104,7 @@ res://
|
|||
├── themes/ # Theme definitions and style resources
|
||||
├── shaders/ # Custom shader materials
|
||||
│ └── vial_fill.gdshader # Canvas-item shader with 3D water surface
|
||||
└── main.tscn # Entry point (loads dashboard)
|
||||
└── main.tscn # Legacy entry point (dashboard only)
|
||||
```
|
||||
|
||||
### Key Implementation Details
|
||||
|
|
|
|||
|
|
@ -8,10 +8,12 @@ V Panel is a visually rich, real-time status monitoring dashboard built entirely
|
|||
|
||||
## Features
|
||||
|
||||
- **Animated splash screen** — Fullscreen splash with "V" and "Panel" text using Orbitron variable font. Font-size zoom animation via `tween_method` with overshoot (TRANS_BACK), then crossfades to dashboard with no black flash.
|
||||
- **Responsive grid dashboard** — Modules auto-arrange in a dynamic grid that adapts to window size. Drag-and-drop to rearrange.
|
||||
- **Variable-size modules** — Modules can span multiple grid cells (1×1, 2×1, 2×2, etc.). Drag edges/corners to resize interactively.
|
||||
- **Shader-based vial fill** — Each module uses a custom `vial_fill.gdshader` instead of progress bars. Features sum-of-sines water surface with edge-damped meniscus, wave distortion, ripple rings, swirl, HSV colour shifting, top-down lighting, sparkle effects, 3D subsurface scattering, gaussian surface foam, and wave-slope specular highlights.
|
||||
- **Shader preset system** — Double-click any module to open a popup menu with 7 visual presets (Vivid Vial, Emerald Deep, Lava Flow, Neon Dream, Deep Purple, Rainbow Swirl, Frostbite). Presets control all visual shader parameters.
|
||||
- **INI-based configuration** — Uses Godot's built-in `ConfigFile` class for human-friendly `.cfg` files. `config/default.cfg` for shipped defaults, `config/config.cfg` for user overrides (gitignored). Background color, module visibility, refresh interval, and theme are configurable.
|
||||
- **Live system monitoring** — Reads CPU usage from `/proc/stat` and memory usage from `/proc/meminfo` on Linux. Extensible module system for adding new collectors.
|
||||
- **Smooth animations** — All fill level transitions use tweens with cubic easing.
|
||||
|
||||
|
|
@ -31,7 +33,7 @@ V Panel is a visually rich, real-time status monitoring dashboard built entirely
|
|||
|
||||
## Project Status
|
||||
|
||||
Active development. Core framework, drag-and-drop with resize, CPU/memory collectors, shader-based vial fill with 3D surface effects, and preset system are implemented. More system modules (disk, network) are planned.
|
||||
Active development. Core framework, drag-and-drop with resize, CPU/memory collectors, shader-based vial fill with 3D surface effects, preset system, animated splash screen with crossfade transition, and INI-based config system are implemented. More system modules (disk, network) are planned.
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue