1.4 KiB
1.4 KiB
Common Playbooks
Use these when implementing frequent NVGT tasks.
1. Extract Reusable Module
- Identify stable API boundary.
- Move generic code to library module.
- Leave game-specific data flow in project wrapper.
- Add minimal setup hooks (callbacks/path settings).
- Compile-check immediately.
2. Build Menu Subsystem
- Choose engine primitive (
menu,audio_form, or custom loop). - Define navigation keys and wrap behavior explicitly.
- Add menu sounds by configurable path.
- Add optional tick callback for background updates.
- Verify keyboard-only operation and escape paths.
3. Build Notification Subsystem
- Implement queue and bounded history.
- Add key navigation for older/newer/latest entries.
- Keep playback delay configurable.
- Route speech through project-selected speak callback.
- Verify behavior with and without notification sound files.
4. Build File/Docs Viewer
- Keep viewer/editor generic.
- Add project wrapper for labels/path conventions.
- Ensure read-only mode is truly non-destructive.
- Add optional save path for edit mode only.
- Verify open failure and save failure speech paths.
5. Add Global Volume Controls
- Centralize min/max/step and current dB.
- Add key handler (PageUp/PageDown by default).
- Support callback to apply volume in project audio layer.
- Announce volume as percent for accessibility.
- Verify no-op behavior at bounds.