UIPatient Class
Individual patient information dialog
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)
- afterLoad(old, new) (overrides Window:afterLoad)
- beginDrag(x, y) (inherited from Window)
- bringToTop() (inherited from Window)
- close() (inherited from Window)
- draw(canvas, x_, y_) (overrides Window:draw)
- drawBar(canvas, sprite, ybase, xpos, ypos, value)
- drawHealthHistory(canvas, x, y)
- drawTreatmentHistory(canvas, x, y)
- 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)
- goHome()
- guessDisease()
- hitTest(x, y) (overrides Window:hitTest)
- 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)
- normaliseWarmth(warmth)
- onChangeLanguage() (inherited from Window)
- onChangeResolution() (inherited from Window)
- onCursorWorldPositionChange(x, y) (inherited from Window)
- onMouseDown(button, x, y) (overrides Window:onMouseDown)
- onMouseMove(x, y, dx, dy) (overrides Window:onMouseMove)
- onMouseUp(button, x, y) (overrides Window:onMouseUp)
- onMouseWheel(x, y) (inherited from Window)
- onTick() (overrides Window:onTick)
- onWorldTick() (inherited from Window)
- registerKeyHandlers()
- removeAllPanels() (inherited from Window)
- removeKeyHandler(keys) (inherited from Window)
- removeWindow(window) (inherited from Window)
- scrollToPatient()
- 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)
- startButtonBlinking(button_index) (inherited from Window)
- stopButtonBlinking() (inherited from Window)
- updateInformation()
- viewDiseases()
- viewQueue()
Member Index
- active_button (*)
- active_scrollbar (*)
- apply_ui_scale (*)
- blink_counter (*)
- blinking_button (*)
- btn_repeat_delay (*)
- buttons (*)
- buttons_down (*)
- closed (*)
- cursor_x (*)
- cursor_y (*)
- default_button_sound (*)
- disease_blanker
- disease_button
- do_scroll
- draggable (*)
- dragging (*)
- esc_closes
- font
- guess_blanker
- guess_button
- height
- history_panel
- home_blanker
- home_button
- hotkeyboxes (*)
- key_handlers (*)
- modal_class
- panel_sprites
- panels (*)
- parent (*)
- patient
- scrollbars (*)
- textboxes (*)
- tooltip_regions (*)
- ui
- visible (*)
- visible_diamond
- width
- windows (*)
- x
- x_original (*)
- y
- y_original (*)
function UIPatient:UIPatient(ui, patient)
Parameters:
| Name | Type | Description |
|---|---|---|
| ui | ? | ? |
| patient | ? | ? |
Declared on: line 35 of Lua/dialogs/patient.lua.
function UIPatient:afterLoad(old, new)
Parameters:
| Name | Type | Description |
|---|---|---|
| old | ? | ? |
| new | ? | ? |
Overrides: Window:afterLoad.
Declared on: line 359 of Lua/dialogs/patient.lua.
function UIPatient:draw(canvas, x_, y_)
Parameters:
| Name | Type | Description |
|---|---|---|
| canvas | ? | ? |
| x_ | ? | ? |
| y_ | ? | ? |
Overrides: Window:draw.
Declared on: line 135 of Lua/dialogs/patient.lua.
function UIPatient:drawBar(canvas, sprite, ybase, xpos, ypos, value)
Draw a bar in the patient dialogue window.
Parameters:
| Name | Type | Description |
|---|---|---|
| canvas | ? | Canvas to draw at. |
| sprite | ? | The sprite to draw |
| ybase | ? | Vertical base position. |
| xpos | ? | Horizontal offset. |
| ypos | ? | Vertical offset. |
| value | ? | Fraction to draw. |
Declared on: line 120 of Lua/dialogs/patient.lua.
function UIPatient:drawHealthHistory(canvas, x, y)
Draw the health graph of the patient.
Parameters:
| Name | Type | Description |
|---|---|---|
| canvas | ? | Destination to draw on. |
| x | int | X position of the top-left of the graph. |
| y | int | Y position of the top-left of the graph. |
Declared on: line 191 of Lua/dialogs/patient.lua.
function UIPatient:drawTreatmentHistory(canvas, x, y)
List the treatments that were performed on the patient.
This text is always capitalised.
Parameters:
| Name | Type | Description |
|---|---|---|
| canvas | ? | Destination to draw on. |
| x | int | X position of the top of the list. |
| y | int | Y position of the top of the list. |
Declared on: line 179 of Lua/dialogs/patient.lua.
function UIPatient:hitTest(x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
Overrides: Window:hitTest.
Declared on: line 355 of Lua/dialogs/patient.lua.
function UIPatient.normaliseWarmth(warmth)
Normalise warmth of a patient.
Parameters:
| Name | Type | Description |
|---|---|---|
| warmth | number or or or nil | If given, the fraction of warmth of the patient. |
Declared on: line 104 of Lua/dialogs/patient.lua.
Note: Is a function rather than a method.
function UIPatient:onMouseDown(button, x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| button | ? | ? |
| x | ? | ? |
| y | ? | ? |
Overrides: Window:onMouseDown.
Declared on: line 231 of Lua/dialogs/patient.lua.
function UIPatient:onMouseMove(x, y, dx, dy)
Parameters:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
| dx | ? | ? |
| dy | ? | ? |
Overrides: Window:onMouseMove.
Declared on: line 261 of Lua/dialogs/patient.lua.
function UIPatient:onMouseUp(button, x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| button | ? | ? |
| x | ? | ? |
| y | ? | ? |
Overrides: Window:onMouseUp.
Declared on: line 236 of Lua/dialogs/patient.lua.
function UIPatient:onTick()
Overrides: Window:onTick.
Declared on: line 275 of Lua/dialogs/patient.lua.
function UIPatient:scrollToPatient()
Scrolls the map to the position of the patient which this dialog belongs to
Declared on: line 266 of Lua/dialogs/patient.lua.
function UIPatient:updateInformation()
Go through the buttons in the patient dialog to check whether they should be visible
Declared on: line 282 of Lua/dialogs/patient.lua.