On this page
  1. portraits
  2. speakers
  3. flow
  4. height
  5. width
  6. portrait_size
  7. portrait_side
  8. name_offset, choices, pauses_world, style, name_style, choice_style, ours
  9. show, toggle_history

rmp::ui::DialogueBox

struct #include <rmp/ui.h> include/rmp/ui.h:1416
struct DialogueBox

The classic box: along the bottom of the screen, the speaker's portrait and name beside the line, the choices as buttons under it.

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

height

float height = 0

Design units; 0 = as the line needs

width

float width = 0

Design units; 0 = as wide as it is given

portrait_size

float portrait_size = 96

Design units, square

portrait_side

DialogueSide portrait_side = DialogueSide::LEFT

Which side of the line

name_offset, choices, pauses_world, style, name_style, choice_style, ours

Vector2 name_offset{ 0, 0 }
DialogueChoices choices = DialogueChoices::IN_BOX
bool pauses_world = true
Style style{}
Style name_style{}
Style choice_style{}
DialogueMemory ours

The name plate over the box's top edge, moved this far from its top-left corner ({ 16, -18 }: a tab on the frame); { 0, 0 } = above the line.

choices: Where the choices go

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

style: The box

name_style: The name plate

choice_style: Each choice

ours: Its state between frames; yours to read

show, toggle_history

bool show(rmp::Dialogue &dialogue)
void toggle_history()

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

toggle_history: The lines read so far, in place of the box