Skip to content

DialogQueue beta ​

Class of @v12-engine/client/common

ts
export declare class DialogQueue

The lines said to the player, the first showing: see the top of this file. client.dialog is the game's; a cut on a stage that has none makes one of its own

Members ​

constructor ​

ts
constructor(
    display: {
        show(line: LineInfo): () => void;
    }, options?: {
        speakers?: () => Record<string, SpeakerLook> | undefined;
        name?: (speaker: string, named: string) => string;
        look?: () => DialogQueueLook | undefined;
        speed?: () => number;
    });

Constructs a new instance of the DialogQueue class

ts
head(): LineInfo | null;

The line showing now, or nothing

history ​

ts
history(): readonly LineInfo[];

The lines said, the oldest first, as many as the look keeps (history): for a log of the conversation

next ​

ts
next(): boolean;

Enter, or a click on the box: shows the rest of a line still being typed; else moves on from the line showing (the one who said it takes it away). Whether there was a line to do it to

onChange ​

ts
onChange(listener: () => void): () => void;

Hears every change: a line shown, queued, taken out, typed out. Gives back what stops hearing

paceOf ​

ts
paceOf(info: LineInfo): number;

Characters a second a line is typed at: its own, or the look's, as fast as the player set (speed). 0 is all at once, as is a speed with no end

queue ​

ts
queue(): LineInfo[];

The lines waiting their turn, behind the one showing

remove ​

ts
remove(id: number): void;

Takes a line out by its id: off the screen if it shows (the next shown), or out of the queue

say ​

ts
say(line: DialogLine, into?: SayInto): QueuedLine;

Says a line: shown now when nothing else is, else queued (a cinematic's after the cinematic's lines said before it, the rules' after those). A line of the rules takes the place of one of theirs not over yet, as the rules hear one line at a time. What it gives back takes it out again

skipAll ​

ts
skipAll(from?: LineFrom): void;

Moves on from every line, the one showing and those waiting, of a cinematic's (from: 'cut') or the rules' or both

typed ​

ts
typed(): number;

How many characters of the head's words show now: all of them but while a typewriter types them

typedAll ​

ts
get typedAll(): boolean;

The head's words are all shown