Character dialog added. First attempt, let's see what happens.
This commit is contained in:
23
README.md
23
README.md
@@ -9,6 +9,7 @@ Reusable NVGT helpers for Storm projects.
|
||||
- `text_reader_compat.nvgt`: Optional aliases (`text_reader*`) for legacy code.
|
||||
- `ui.nvgt`: Dialog wrappers with optional main-window restoration.
|
||||
- `speech_history.nvgt`: `speak_with_history()` wrapper plus comma/period history navigation.
|
||||
- `character_dialog.nvgt`: Blocking dialog lines with repeat/next/skip keys and optional per-word pre-speech sounds.
|
||||
- `notifications.nvgt`: Queued notifications with history and optional sound playback.
|
||||
- `menu_helpers.nvgt`: Simple menu runner + filter helpers with `sounds/menu` defaults.
|
||||
- `menu_music.nvgt`: Reusable menu music start/pause/stop helpers with blocking fade-out pause by default.
|
||||
@@ -29,6 +30,7 @@ Reusable NVGT helpers for Storm projects.
|
||||
#include "libstorm-nvgt/text_reader_compat.nvgt" // Optional legacy aliases
|
||||
#include "libstorm-nvgt/ui.nvgt"
|
||||
#include "libstorm-nvgt/speech_history.nvgt"
|
||||
#include "libstorm-nvgt/character_dialog.nvgt"
|
||||
#include "libstorm-nvgt/notifications.nvgt"
|
||||
#include "libstorm-nvgt/menu_helpers.nvgt"
|
||||
#include "libstorm-nvgt/menu_music.nvgt"
|
||||
@@ -110,6 +112,22 @@ void stop_main_menu_music() {
|
||||
file_viewer_file("README.txt", "Readme", true);
|
||||
```
|
||||
|
||||
## character_dialog Example
|
||||
|
||||
```nvgt
|
||||
#include "libstorm-nvgt/character_dialog.nvgt"
|
||||
|
||||
void play_intro_dialog() {
|
||||
string[] lines = {"Welcome to the gate.", "State your name and purpose."};
|
||||
character_dialog_show_lines(lines);
|
||||
}
|
||||
```
|
||||
|
||||
```nvgt
|
||||
// Optional override sound. Custom paths play once per line instead of once per word.
|
||||
character_dialog_set_sound_path("sounds/cutscene/chime");
|
||||
```
|
||||
|
||||
## speech_history + notifications Example
|
||||
|
||||
```nvgt
|
||||
@@ -140,7 +158,8 @@ void on_event() {
|
||||
## learn_sounds Example (Project Override File)
|
||||
|
||||
```nvgt
|
||||
// In your project root, create excluded_sounds.nvgt:
|
||||
// The override file can be named and placed anywhere in your project.
|
||||
// Example file: src/sound_settings.nvgt
|
||||
void configure_project_learn_sounds() {
|
||||
learn_sounds_reset_configuration();
|
||||
learn_sounds_add_skip_entry("sounds/menu/");
|
||||
@@ -151,7 +170,7 @@ void configure_project_learn_sounds() {
|
||||
```nvgt
|
||||
// In your game module:
|
||||
#include "libstorm-nvgt/learn_sounds.nvgt"
|
||||
#include "excluded_sounds.nvgt"
|
||||
#include "src/sound_settings.nvgt"
|
||||
#include "libstorm-nvgt/speech_history.nvgt"
|
||||
|
||||
void learn_sounds_bridge_speak(const string &in message, bool interrupt) {
|
||||
|
||||
Reference in New Issue
Block a user