DialogQueue beta
Class of @v12-engine/client
export declare class DialogQueueThe 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
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
head
head(): LineInfo | null;The line showing now, or nothing
history
history(): readonly LineInfo[];The lines said, the oldest first, as many as the look keeps (history): for a log of the conversation
next
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
onChange(listener: () => void): () => void;Hears every change: a line shown, queued, taken out, typed out. Gives back what stops hearing
paceOf
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
queue(): LineInfo[];The lines waiting their turn, behind the one showing
remove
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
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
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
typed(): number;How many characters of the head's words show now: all of them but while a typewriter types them
typedAll
get typedAll(): boolean;The head's words are all shown