UIBottomPanel Class
The multi-purpose panel for launching dialogs / screens and dynamic information.
Method Index
- addBevelPanel(x, y, w, h, colour, highlight_colour, shadow_colour, disabled_colour) (inherited from Window)
 - addColourPanel(x, y, w, h, r, g, b) (inherited from Window)
 - addDialog(dialog_class, extra_function)
 - addKeyHandler(key, handler, ...) (inherited from Window)
 - addPanel(sprite_index, x, y, w, h) (inherited from Window)
 - addWindow(window) (inherited from Window)
 - afterLoad(old, new) (overrides Window:afterLoad)
 - beginDrag(x, y) (inherited from Window)
 - bringToTop() (inherited from Window)
 - close() (inherited from Window)
 - createMessageWindow(index)
 - dialogBankCommon(enable, stats)
 - dialogBankManager(enable)
 - dialogBankStats(enable)
 - dialogBuildRoom()
 - dialogCharts(enable)
 - dialogDrugCasebook(enable)
 - dialogFurnishCorridor()
 - dialogHireStaff()
 - dialogPolicy(enable)
 - dialogResearch(enable)
 - dialogStaffManagement(enable)
 - dialogStatus(enable)
 - dialogTownMap(enable)
 - draw(canvas, x, y) (overrides Window:draw)
 - drawDynamicInfo(canvas, x, y)
 - drawReputationMeter(canvas, x_left, y)
 - editRoom()
 - getSavedWindowPositionName() (inherited from Window)
 - getTooltipAt(x, y) (inherited from Window)
 - getTooltipForElement(elem, x, y) (inherited from Window)
 - getWindow(window_class) (inherited from Window)
 - getWindows(window_class) (inherited from Window)
 - giveResearchAdvice()
 - hitTest(x, y, x_offset) (overrides Window:hitTest)
 - hitTestPanel(x, y, panel) (inherited from Window)
 - makeButtonOnPanel(panel, x, y, w, h, sprite, on_click, on_click_self, on_rightclick) (inherited from Window)
 - makeDynamicTooltip(callback, x, y, r, b, tooltip_x, tooltip_y) (inherited from Window)
 - makeScrollbarOnPanel(panel, slider_colour, callback, min_value, max_value, page_size, value) (inherited from Window)
 - makeTextboxOnPanel(panel, confirm_callback, abort_callback) (inherited from Window)
 - makeTooltip(text, x, y, r, b, tooltip_x, tooltip_y) (inherited from Window)
 - onChangeLanguage() (inherited from Window)
 - onChangeResolution() (inherited from Window)
 - onCursorWorldPositionChange(x, y) (inherited from Window)
 - onMouseDown(button, x, y) (inherited from Window)
 - onMouseMove(x, y, dx, dy) (overrides Window:onMouseMove)
 - onMouseUp(button, x, y) (inherited from Window)
 - onTick() (overrides Window:onTick)
 - onWorldTick() (inherited from Window)
 - openFirstMessage()
 - openJukebox()
 - openLastMessage()
 - openLoad()
 - openSave()
 - queueMessage(type, message, owner, timeout, default_choice, callback)
 - quickLoad()
 - quickSave()
 - quit()
 - removeAllPanels() (inherited from Window)
 - removeMessage(owner)
 - removeWindow(window) (inherited from Window)
 - restart()
 - sendToBottom(window) (inherited from Window)
 - sendToTop(window) (inherited from Window)
 - setDefaultPosition(x, y) (inherited from Window)
 - setDynamicInfo(info)
 - setPosition(x, y) (overrides Window:setPosition)
 - showAdditionalButtons(x, y)
 - showMessage()
 - startButtonBlinking(button_index) (inherited from Window)
 - stopButtonBlinking() (inherited from Window)
 - toggleInformation()
 - updateButtonStates()
 
Member Index
- active_button (*)
 - active_scrollbar (*)
 - additional_buttons
 - additional_panels
 - bank_button
 - blink_counter (*)
 - blinking_button (*)
 - btn_repeat_delay (*)
 - buttons
 - buttons_down (*)
 - closed (*)
 - countdown
 - date_font
 - default_button_sound
 - draggable (*)
 - dragging (*)
 - dynamic_info
 - factory_counter
 - factory_direction
 - height
 - key_handlers (*)
 - message_queue
 - message_windows
 - money_font
 - on_top
 - panel_sprites
 - panels (*)
 - parent (*)
 - pause_font
 - scrollbars (*)
 - show_animation
 - textboxes (*)
 - toggleAdviser
 - tooltip_regions (*)
 - ui
 - visible (*)
 - white_font
 - width
 - windows (*)
 - world
 - x
 - x_original (*)
 - y
 - y_original (*)
 
function UIBottomPanel:UIBottomPanel(ui)
Parameters:
| Name | Type | Description | 
|---|---|---|
| ui | ? | ? | 
Declared on: line 24 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:addDialog(dialog_class, extra_function)
Parameters:
| Name | Type | Description | 
|---|---|---|
| dialog_class | ? | ? | 
| extra_function | ? | ? | 
Declared on: line 653 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:afterLoad(old, new)
Parameters:
| Name | Type | Description | 
|---|---|---|
| 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:
 
| Name | Type | Description | 
|---|---|---|
| index | ? | ? | 
Declared on: line 358 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:dialogBankCommon(enable, stats)
Parameters:
| Name | Type | Description | 
|---|---|---|
| enable | ? | ? | 
| stats | ? | ? | 
Declared on: line 452 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:dialogBankManager(enable)
Parameters:
| Name | Type | Description | 
|---|---|---|
| enable | ? | ? | 
Declared on: line 444 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:dialogBankStats(enable)
Parameters:
| Name | Type | Description | 
|---|---|---|
| enable | ? | ? | 
Declared on: line 448 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:dialogCharts(enable)
Parameters:
| Name | Type | Description | 
|---|---|---|
| enable | ? | ? | 
Declared on: line 602 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:dialogDrugCasebook(enable)
Parameters:
| Name | Type | Description | 
|---|---|---|
| enable | ? | ? | 
Declared on: line 538 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:dialogFurnishCorridor()
Declared on: line 484 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:dialogPolicy(enable)
Parameters:
| Name | Type | Description | 
|---|---|---|
| enable | ? | ? | 
Declared on: line 617 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:dialogResearch(enable)
Parameters:
| Name | Type | Description | 
|---|---|---|
| enable | ? | ? | 
Declared on: line 553 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:dialogStaffManagement(enable)
Parameters:
| Name | Type | Description | 
|---|---|---|
| enable | ? | ? | 
Declared on: line 508 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:dialogStatus(enable)
Parameters:
| Name | Type | Description | 
|---|---|---|
| enable | ? | ? | 
Declared on: line 587 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:dialogTownMap(enable)
Parameters:
| Name | Type | Description | 
|---|---|---|
| enable | ? | ? | 
Declared on: line 523 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:draw(canvas, x, y)
Parameters:
| Name | Type | Description | 
|---|---|---|
| canvas | ? | ? | 
| x | ? | ? | 
| y | ? | ? | 
 Overrides: Window:draw.
 Declared on: line 157 of Lua/dialogs/bottom_panel.lua.
 
function UIBottomPanel:drawDynamicInfo(canvas, x, y)
Parameters:
| Name | Type | Description | 
|---|---|---|
| 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:
 
| Name | Type | Description | 
|---|---|---|
| canvas | ? | ? | 
| x_left | ? | ? | 
| y | ? | ? | 
Declared on: line 194 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:hitTest(x, y, x_offset)
Parameters:
| Name | Type | Description | 
|---|---|---|
| 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:
| Name | Type | Description | 
|---|---|---|
| x | ? | ? | 
| y | ? | ? | 
| dx | ? | ? | 
| dy | ? | ? | 
 Overrides: Window:onMouseMove.
 Declared on: line 237 of Lua/dialogs/bottom_panel.lua.
 
function UIBottomPanel:onTick()
 Overrides: Window:onTick.
 Declared on: line 394 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:
 
| Name | Type | Description | 
|---|---|---|
| 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:
 
| Name | Type | Description | 
|---|---|---|
| owner | ? | ? | 
Declared on: line 338 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:setDynamicInfo(info)
Parameters:
| Name | Type | Description | 
|---|---|---|
| info | ? | ? | 
Declared on: line 228 of Lua/dialogs/bottom_panel.lua.
function UIBottomPanel:setPosition(x, y)
Parameters:
| Name | Type | Description | 
|---|---|---|
| x | ? | ? | 
| y | ? | ? | 
 Overrides: Window:setPosition.
 Declared on: line 189 of Lua/dialogs/bottom_panel.lua.
 
function UIBottomPanel:showAdditionalButtons(x, y)
Parameters:
| Name | Type | Description | 
|---|---|---|
| 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.