Skip to main content

Module text_box

Module text_box 

Source
Expand description

A dialogue’s text box: its text word-wrapped into pages, typed out at the player’s text speed and faster while the key that goes on is held (TextBox); what it shows (TextView: the page as revealed, the replies of a choice, the question before skipping a scene, the marker that waits for a key); and its glyph look (glyph::paint).

Modules§

glyph
The glyph look of a dialogue’s text box: a single-line panel with the speaker’s name on its border, the revealed text (narration dim and centred), the replies of a choice with the focused one marked, the question before skipping a scene, and, while a page waits, the key that goes on and a blinking ▼. While the replies are up the box grows upward to list them under the line being answered.

Structs§

SkipView
The question asked before skipping the scene.
TextBox
The text box’s state: the text, wrapped, the page on screen and how much of it is revealed.
TextView
What the text box shows. Build it with TextView::new and assign the rest (ADR-0039).
WaitView
What shows while a page waits for the key that goes on. Build it with WaitView::new and assign the rest (ADR-0039).

Enums§

Step
What the key that goes on did to a text box (TextBox::confirm).

Constants§

BLINK_S
The marker that says “press to go on” is lit for this long, then out for as long, while a page waits.
FAST_FORWARD
Reveal speed multiplier while the key that goes on is held (the HurryClock’s default factor).
FAST_FORWARD_DELAY
Seconds that key must be held on a page before it reveals faster, so the tap that turned the page doesn’t speed the next one up (the HurryClock’s default delay).