concinnity_core/components/story_command.rs
1// src/components/story_command.rs
2
3/// Runtime-only event sent by UiInputSystem when a `story:*` action fires (a
4/// stage click, a Space press, a choice button, a Start / Restart button). The
5/// story system reads these and moves through the story graph. World authors
6/// never declare this type directly.
7#[derive(Debug, Clone, Default, PartialEq, Eq)]
8pub enum StoryCommand {
9 /// Reset to the first node and show the stage.
10 Start,
11 /// Resume from the saved position, or start fresh when no save exists.
12 Continue,
13 /// Advance the current page: complete a mid-reveal, else move on.
14 #[default]
15 Advance,
16 /// Pick the current choice menu's option by index.
17 Choose(usize),
18 /// Toggle auto-advance (pages turn on their own once revealed).
19 ToggleAuto,
20 /// Toggle fast-forward (instant reveal, rapid page turns; stops at menus).
21 ToggleSkip,
22 /// Toggle the dialogue-history overlay.
23 ToggleLog,
24 /// Open the slot overlay in save mode.
25 OpenSave,
26 /// Open the slot overlay in load mode.
27 OpenLoad,
28 /// Pick a slot in the open slot overlay.
29 Slot(usize),
30 /// Toggle the pause menu over the stage: show it from the stage (or close an
31 /// open overlay first), and return to the stage when it is up.
32 TogglePause,
33 /// Open the settings screen, remembering the menu that opened it so it can be
34 /// returned to.
35 OpenSettings,
36 /// Close the settings screen, returning to whichever menu opened it.
37 CloseSettings,
38}