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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue