CorsixTH Lua Documentation

UIPatient Class

Individual patient information dialog

Declared on: line 29 of Lua/dialogs/patient.lua.
Inheritance: UIPatient ยป Window

Method Index

Member Index

(*) only used in superclass methods
function UIPatient:UIPatient(ui, patient)

Parameters:

NameTypeDescription
ui ? ?
patient ? ?

Declared on: line 35 of Lua/dialogs/patient.lua.

function UIPatient:afterLoad(old, new)

Parameters:

NameTypeDescription
old ? ?
new ? ?

Overrides: Window:afterLoad.
Declared on: line 359 of Lua/dialogs/patient.lua.

function UIPatient:draw(canvas, x_, y_)

Parameters:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
x ? ?
y ? ?

Overrides: Window:hitTest.
Declared on: line 355 of Lua/dialogs/patient.lua.

function UIPatient.normaliseWarmth(warmth)

Normalise warmth of a patient.

Parameters:

NameTypeDescription
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:

NameTypeDescription
button ? ?
x ? ?
y ? ?

Overrides: Window:onMouseDown.
Declared on: line 231 of Lua/dialogs/patient.lua.

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

Parameters:

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

Overrides: Window:onMouseMove.
Declared on: line 261 of Lua/dialogs/patient.lua.

function UIPatient:onMouseUp(button, x, y)

Parameters:

NameTypeDescription
button ? ?
x ? ?
y ? ?

Overrides: Window:onMouseUp.
Declared on: line 236 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.