CorsixTH Lua Documentation

UIAdviser Class

The (ideally) helpful advisor who pops up from the bottom dialog during a game.

Declared on: line 23 of Lua/dialogs/adviser.lua.
Inheritance: UIAdviser ยป Window

Method Index

Member Index

(*) only used in superclass methods
function UIAdviser:UIAdviser(ui)

Parameters:

NameTypeDescription
ui ? ?

Declared on: line 26 of Lua/dialogs/adviser.lua.

function UIAdviser:afterLoad(old, new)

Parameters:

NameTypeDescription
old ? ?
new ? ?

Overrides: Window:afterLoad.
Declared on: line 255 of Lua/dialogs/adviser.lua.

function UIAdviser:draw(canvas, x, y)

Parameters:

NameTypeDescription
canvas ? ?
x ? ?
y ? ?

Overrides: Window:draw.
Declared on: line 163 of Lua/dialogs/adviser.lua.

function UIAdviser:hide()

Hides the adviser by running the appropriate animation.

Declared on: line 116 of Lua/dialogs/adviser.lua.

function UIAdviser:idle()

Makes the adviser idle for a while before disappearing. This means that the text bubble is removed.

Declared on: line 104 of Lua/dialogs/adviser.lua.

function UIAdviser:onMouseDown(button, x, y)

Parameters:

NameTypeDescription
button ? ?
x ? ?
y ? ?

Overrides: Window:onMouseDown.
Declared on: line 182 of Lua/dialogs/adviser.lua.

function UIAdviser:say(speech, talk_until_next_announce, override_current)

Makes the adviser say something

Parameters:

NameTypeDescription
speech ? The table containing the text he should say and the priority.
talk_until_next_announce ? Whether he should stay up until the next say() call is made. Useful for the tutorial.
override_current ? Cancels previous messages (if any) immediately and shows this new one instead.

Declared on: line 125 of Lua/dialogs/adviser.lua.

function UIAdviser:show()

Shows the adviser by running the "popup" animation. Then moves on to the next phase automatically.

Declared on: line 58 of Lua/dialogs/adviser.lua.

function UIAdviser:talk()

Displays the text bubble along with the next message from the queue.

Declared on: line 67 of Lua/dialogs/adviser.lua.

Page generated on Sat Feb 07, 2015 at 18:38:28 by LDocGen.