On this page
  1. portraits
  2. speakers
  3. flow
  4. portrait_height
  5. enter_seconds, enter_offset
  6. focus_seconds, focus_lift, focus_scale, pauses_world, style, name_style, choice_style, dimmed, ours
  7. show
  8. shake
  9. flash

rmp::ui::DialogueStage

struct #include <rmp/ui.h> include/rmp/ui.h:1474
struct DialogueStage

A visual novel's stage: big portraits of who is on it, the speaker in front and the rest dimmed, and the line in a box under them.

portraits

std::vector<Portrait> portraits{}

By speaker, and by mood

speakers

std::vector<Speaker> speakers{}

A box, a name plate and a voice each

flow

DialogueFlow flow{}

The typewriter, the blips, auto-advance, timed choices

portrait_height

float portrait_height = 300

Design units

enter_seconds, enter_offset

float enter_seconds = 0.3f
float enter_offset = 80

Who comes on stage slides in from their side and fades in, in this long.

enter_offset: ...from this far, in design units

focus_seconds, focus_lift, focus_scale, pauses_world, style, name_style, choice_style, dimmed, ours

float focus_seconds = 0.15f
float focus_lift = 10
float focus_scale = 1.04f
bool pauses_world = true
Style style{}
Style name_style{}
Style choice_style{}
Color dimmed = CLITERAL(Color){ 120, 120, 130, 255 }
DialogueMemory ours

The speaker comes forward — full colour, a little higher and bigger — in this long, and whoever stops speaking goes back as long.

focus_lift: Design units the speaker rises

focus_scale: The speaker's size against the rest

pauses_world: For rmp::behavior::Talker: the scene below waits

style: The box under the portraits

name_style: The name plate

choice_style: Each choice

dimmed: The tint of who is not speaking

ours: Its state between frames; yours to read

show

bool show(rmp::Dialogue &dialogue)

Draws the stage, the line or the choices, and takes the player's answer. True while the dialogue has something to show.

shake

void shake(float strength = 12, float seconds = 0.4f)

The whole stage shakes, from strength design units down to none: a command's, <<quake>> -> stage.shake().

flash

void flash(Color color = WHITE, float seconds = 0.3f)

The screen goes color and back, over seconds: a flash, a cut.