CorsixTH Lua Documentation

UIBottomPanel Class

The multi-purpose panel for launching dialogs / screens and dynamic information.

Declared on: line 21 of Lua/dialogs/bottom_panel.lua.
Inheritance: UIBottomPanel ยป Window

Method Index

Member Index

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

Parameters:

NameTypeDescription
ui ? ?

Declared on: line 24 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:addDialog(dialog_class, extra_function)

Parameters:

NameTypeDescription
dialog_class ? ?
extra_function ? ?

Declared on: line 653 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:afterLoad(old, new)

Parameters:

NameTypeDescription
old ? ?
new ? ?

Overrides: Window:afterLoad.
Declared on: line 700 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:createMessageWindow(index)

Pop the message with the given index from the message queue and turn it into an actual message window; if no index is provided the first message in the queue is popped.

Parameters:

NameTypeDescription
index ? ?

Declared on: line 358 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:dialogBankCommon(enable, stats)

Parameters:

NameTypeDescription
enable ? ?
stats ? ?

Declared on: line 452 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:dialogBankManager(enable)

Parameters:

NameTypeDescription
enable ? ?

Declared on: line 444 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:dialogBankStats(enable)

Parameters:

NameTypeDescription
enable ? ?

Declared on: line 448 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:dialogCharts(enable)

Parameters:

NameTypeDescription
enable ? ?

Declared on: line 602 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:dialogDrugCasebook(enable)

Parameters:

NameTypeDescription
enable ? ?

Declared on: line 538 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:dialogPolicy(enable)

Parameters:

NameTypeDescription
enable ? ?

Declared on: line 617 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:dialogResearch(enable)

Parameters:

NameTypeDescription
enable ? ?

Declared on: line 553 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:dialogStatus(enable)

Parameters:

NameTypeDescription
enable ? ?

Declared on: line 587 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:dialogTownMap(enable)

Parameters:

NameTypeDescription
enable ? ?

Declared on: line 523 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:draw(canvas, x, y)

Parameters:

NameTypeDescription
canvas ? ?
x ? ?
y ? ?

Overrides: Window:draw.
Declared on: line 157 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:drawDynamicInfo(canvas, x, y)

Parameters:

NameTypeDescription
canvas ? ?
x ? ?
y ? ?

Declared on: line 203 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:drawReputationMeter(canvas, x_left, y)

Draws the hospital reputation meter on canvas. x_left is the leftmost x-coordinate of the reputation meter y is the y-coordinate of the reputation meter

Parameters:

NameTypeDescription
canvas ? ?
x_left ? ?
y ? ?

Declared on: line 194 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:hitTest(x, y, x_offset)

Parameters:

NameTypeDescription
x ? ?
y ? ?
x_offset ? ?

Overrides: Window:hitTest.
Declared on: line 262 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:onMouseMove(x, y, dx, dy)

Parameters:

NameTypeDescription
x ? ?
y ? ?
dx ? ?
dy ? ?

Overrides: Window:onMouseMove.
Declared on: line 237 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:openFirstMessage()

Opens the first available message in the list of message_windows.

Declared on: line 331 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:openLastMessage()

Opens the last available message. Currently used to open the level completed message.

Declared on: line 304 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:queueMessage(type, message, owner, timeout, default_choice, callback)

The arguments specify a message, which is added to a FIFO queue, and will appear on screen once there is space.

Structure of message (except strike): message = { { text = "first line of text", offset (integer, optional) } { text = "second line of text", offset (integer, optional) } ... choices = { { text = "first choice", choice = "choice_type", enabled = true or false (optional, defaults to true) } ... } }

Parameters:

NameTypeDescription
type string The type of message, can be: "emergency", "epidemy", "personality", "information", "disease", "report" or "strike"
message table or or or number If type == "strike", the amount of pay rise. Else a list of texts to display, including a "choices" table with choices. See below for structure.
owner humanoid or or or nil Some messages are related to one staff or patient. Otherwise this is nil.
timeout number or or or nil If given, the message will expire after that many world ticks and be removed.
default_choice number or or or nil If given, the choice with this number will be executed on expiration of the message.
callback function or or or nil If given, it will be called when the message is closed.

Declared on: line 266 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:removeMessage(owner)

Removes a message from the message queue (for example if a room is built before the player says what to do with the patient.

Parameters:

NameTypeDescription
owner ? ?

Declared on: line 338 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:setDynamicInfo(info)

Parameters:

NameTypeDescription
info ? ?

Declared on: line 228 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:setPosition(x, y)

Parameters:

NameTypeDescription
x ? ?
y ? ?

Overrides: Window:setPosition.
Declared on: line 189 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:showAdditionalButtons(x, y)

Parameters:

NameTypeDescription
x ? ?
y ? ?

Declared on: line 245 of Lua/dialogs/bottom_panel.lua.

function UIBottomPanel:showMessage()

Trigger a message to be moved from the queue into a actual window, after first performing the necessary animation.

Declared on: line 313 of Lua/dialogs/bottom_panel.lua.

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