UIMessage Class
Small fax notification window which sits on the bottom bar.
Method Index
- addBevelPanel(x, y, w, h, colour, highlight_colour, shadow_colour, disabled_colour, lowered_colour, apply_ui_scale) (inherited from Window)
- addColourPanel(x, y, w, h, r, g, b, apply_ui_scale) (inherited from Window)
- addKeyHandler(key, handler, ...) (inherited from Window)
- addPanel(sprite_index, x, y, w, h, apply_ui_scale, draw_flags) (inherited from Window)
- addWindow(window) (inherited from Window)
- adjustToggle()
- afterLoad(old, new) (overrides Window:afterLoad)
- beginDrag(x, y) (inherited from Window)
- bringToTop() (inherited from Window)
- close(...) (overrides Window:close)
- dismissMessage()
- draw(canvas, x, y) (overrides Window:draw)
- getRealXY() (inherited from Window)
- 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)
- hitTest(x, y) (inherited from Window)
- hitTestPanel(x, y, panel) (inherited from Window)
- hoverTest(active_hover, mouse_x, mouse_y, min_x, max_x, min_y, max_y) (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)
- makeHotkeyBoxOnPanel(panel, confirm_callback, abort_callback) (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, apply_ui_scale) (inherited from Window)
- mustPause() (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) (inherited from Window)
- onMouseUp(button, x, y) (inherited from Window)
- onMouseWheel(x, y) (inherited from Window)
- onTick() (overrides Window:onTick)
- onWorldTick() (overrides Window:onWorldTick)
- openMessage()
- removeAllPanels() (inherited from Window)
- removeKeyHandler(keys) (inherited from Window)
- removeMessage(choice_number)
- removeWindow(window) (inherited from Window)
- sendToBottom(window) (inherited from Window)
- sendToTop(window) (inherited from Window)
- setDefaultPosition(x, y) (inherited from Window)
- setPosition(x, y) (inherited from Window)
- setSize(width, height, apply_ui_scale) (inherited from Window)
- setXLimit(stop_x)
- startButtonBlinking(button_index) (inherited from Window)
- stopButtonBlinking() (inherited from Window)
Member Index
- active
- active_button (*)
- active_scrollbar (*)
- apply_ui_scale (*)
- blink_counter (*)
- blinking_button (*)
- btn_repeat_delay (*)
- button
- buttons
- buttons_down (*)
- callback
- can_dismiss
- closed (*)
- cursor_x (*)
- cursor_y (*)
- default_button_sound (*)
- default_choice
- draggable (*)
- dragging (*)
- esc_closes
- fax
- height
- hotkeyboxes (*)
- key_handlers (*)
- message
- onClose
- on_top
- owner
- panel_sprites
- panels (*)
- parent (*)
- rotator
- scrollbars (*)
- stop_x
- stop_y
- textboxes (*)
- timer
- tooltip_regions (*)
- type
- ui
- visible (*)
- width
- windows (*)
- x
- x_original (*)
- y
- y_original (*)
function UIMessage:UIMessage(ui, x, stop_x, onClose, type, message, owner, timeout, default_choice, callback)
Parameters:
| Name | Type | Description |
|---|---|---|
| ui | ? | ? |
| x | ? | ? |
| stop_x | ? | ? |
| onClose | ? | ? |
| type | ? | ? |
| message | ? | ? |
| owner | ? | ? |
| timeout | ? | ? |
| default_choice | ? | ? |
| callback | ? | ? |
Declared on: line 27 of Lua/dialogs/message.lua.
function UIMessage:adjustToggle()
Adjust the toggle state to match if the message is open or not
Declared on: line 98 of Lua/dialogs/message.lua.
function UIMessage:afterLoad(old, new)
Parameters:
| Name | Type | Description |
|---|---|---|
| old | ? | ? |
| new | ? | ? |
Overrides: Window:afterLoad.
Declared on: line 209 of Lua/dialogs/message.lua.
function UIMessage:close(...)
Parameters:
| Name | Type | Description |
|---|---|---|
| ... | ? | ? |
Overrides: Window:close.
Declared on: line 93 of Lua/dialogs/message.lua.
function UIMessage:dismissMessage()
Tries to dismiss the message. This is only possible if there is only one choice.
Declared on: line 155 of Lua/dialogs/message.lua.
function UIMessage:draw(canvas, x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| canvas | ? | ? |
| x | ? | ? |
| y | ? | ? |
Overrides: Window:draw.
Declared on: line 82 of Lua/dialogs/message.lua.
function UIMessage:onTick()
Overrides: Window:onTick.
Declared on: line 169 of Lua/dialogs/message.lua.
function UIMessage:onWorldTick()
Overrides: Window:onWorldTick.
Declared on: line 190 of Lua/dialogs/message.lua.
function UIMessage:openMessage()
Displays the fax/strike message to the player when opened from the bottom_panel.
Declared on: line 106 of Lua/dialogs/message.lua.
function UIMessage:removeMessage(choice_number)
Removes the Message, executing a choice if given, else just deletes it
Parameters:
| Name | Type | Description |
|---|---|---|
| choice_number | number | if given, removes the message by executing this choice. |
Declared on: line 130 of Lua/dialogs/message.lua.
function UIMessage:setXLimit(stop_x)
Parameters:
| Name | Type | Description |
|---|---|---|
| stop_x | ? | ? |
Declared on: line 165 of Lua/dialogs/message.lua.