Parameters:

Return value:

See also:

Returns a named drawable from the current text layer, or nil if a drawable with that name doesn't (yet) exist.

Parameters:

name:

paragraph.append (string)

Gets called during execution of a text line to add pieces of text between commands.

Parameters:

string: The text to append

paragraph.finish ()

Gets called at the end of each text line

paragraph.start (filename, lineNum)

Gets called at the beginning of each text line.

Parameters:

filename: The filename in which the paragraph resides

lineNum: The zero-based text line index of the paragraph

paragraph.stringify (word)

Gets called during execution of a text line to replace words starting with a dollar sign. If a handler function is registered for the word in the paragraph.stringifiers table, that function is evaluated. Otherwise, if word is a valid variable in the local context, its value is converted to a string and appended to the current paragraph.

Parameters:

word: The characters following the dollar sign

popStyle ()

Pops the top entry from the style stack.

pushStyle ()

Adds a new entry to the top of the style stack that's a copy of getCurrentStyle.

registerSpeaker (id, ...)

Registers a paragraph.stringifier function to convert $variables inside text to a call to sayLine. In addition, a global say_XXX function is created that calls the say function to change the active speaker. Example: registerSpeaker("bal", "Balthasar") $bal This line is now said with my name, Balthasar.

Parameters:

id: The value of the text after the $-sign that triggers the say function.

Parameters:

See also:

The text layer constructor gets called when a new text layer is created. It should create the base drawables and return them in a table.

Parameters:

mode: The text mode this constructor is for

func: The constructor function to use

Return value:

A table with the drawables created for the layer. Some table keys have special meanings:

text: The main text box. Any key starting with "text" is considered to be part of the main text box (if you use "textBackground" as a key, that drawable will appear/disappear together with the main textbox).

nameText: An optional secondary text box to hold the speaking character's name. As with "text", all keys starting with "nameText" are considered part of the nameTextBox.

cursor: An optional click-to-continue cursor

setTextModeADV ()

Changes the text mode to bottom-aligned textbox mode

setTextModeNVL ()

Changes the text mode to full-screen textbox mode

style (s)

Changes the current style for the text and appendText functions. Usage: text text text [style{color=0xFFFF0000}] text text For a list of all TextStyle properties (besides color), see: createStyle