CorsixTH Lua Documentation

UIWatch Class

Timer / clock / watch / countdown dialog for emergencies / level start

Declared on: line 21 of Lua/dialogs/watch.lua.
Inheritance: UIWatch ยป Window
Full description:
The timer lasts approximately 100 days, split into 13 segments

Method Index

Member Index

(*) only used in superclass methods
function UIWatch:UIWatch(ui, count_type)

Parameters:

NameTypeDescription
ui ? ?
count_type string One of: "open_countdown" or "emergency" or "epidemic"

Declared on: line 32 of Lua/dialogs/watch.lua.

function UIWatch:afterLoad(old, new)

Parameters:

NameTypeDescription
old ? ?
new ? ?

Overrides: Window:afterLoad.
Declared on: line 212 of Lua/dialogs/watch.lua.

function UIWatch:cycleTimerEventPatient()

During an emergency - Cycles through the patient dialogs of all the emergency patients

During an epidemic - Cycles to the first patient who is infected but not vaccinated

Declared on: line 164 of Lua/dialogs/watch.lua.

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

Parameters:

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

Overrides: Window:onMouseMove.
Declared on: line 129 of Lua/dialogs/watch.lua.

function UIWatch:scrollToTimerEventPatient()

While cycling through timer event patients (@see UIWatch:cycleTimerEventPatient) scrolls the screen to centre on the selected patient If a patient dialog is open that does not belong to the timer event, does nothing

Declared on: line 193 of Lua/dialogs/watch.lua.

function UIWatch:toggleVaccinationMode()

Toggles vaccination mode by toggling the button then toggling the mode in the current epidemic.

Declared on: line 156 of Lua/dialogs/watch.lua.