UIPolicy Class
Hospital policy fullscreen window (set staff tiredness and patient cure thresholds, etc.).
Inheritance: UIPolicy » UIFullscreen » Window
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 UIFullscreen:afterLoad)
- beginDrag(x, y) (inherited from Window)
- bringToTop() (inherited from Window)
- close() (overrides Window:close)
- draw(canvas, x, y) (overrides UIFullscreen:draw)
- getRealXY() (inherited from Window)
- getSavedWindowPositionName() (inherited from UIFullscreen)
- getStaffPosition(dx, dy) (inherited from UIFullscreen)
- 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 UIFullscreen)
- 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 UIFullscreen)
- onCursorWorldPositionChange(x, y) (inherited from Window)
- onMouseDown(code, x, y) (overrides UIFullscreen:onMouseDown)
- onMouseMove(x, y, dx, dy) (overrides Window:onMouseMove)
- onMouseUp(code, x, y) (overrides Window:onMouseUp)
- onMouseWheel(x, y) (inherited from Window)
- onTick() (inherited from Window)
- onWorldTick() (inherited from Window)
- panelHit(x, y)
- removeAllPanels() (inherited from Window)
- removeKeyHandler(keys) (inherited from Window)
- 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)
- startButtonBlinking(button_index) (inherited from Window)
- stopButtonBlinking() (inherited from Window)
Member Index
- active_button (*)
- active_scrollbar (*)
- allow_button
- apply_ui_scale (*)
- background
- blink_counter (*)
- blinking_button (*)
- border_sprites (*)
- btn_repeat_delay (*)
- buttons (*)
- buttons_down (*)
- category (*)
- closed (*)
- cursor_x (*)
- cursor_y (*)
- default_button_sound (*)
- down_x
- draggable (*)
- dragging (*)
- esc_closes (*)
- height (*)
- hospital
- hotkeyboxes (*)
- key_handlers (*)
- label_font
- modal_class (*)
- moved_x
- moving_panel
- offset
- panel_sprites
- panels (*)
- parent (*)
- position_x
- prohibit_button
- scrollbars (*)
- selected_staff (*)
- sliders
- sliders_z
- staff_members (*)
- text_font
- textboxes (*)
- tooltip_regions (*)
- ui
- visible (*)
- width (*)
- windows (*)
- x
- x_original (*)
- y
- y_original (*)
function UIPolicy:UIPolicy(ui)
Parameters:
| Name | Type | Description |
|---|---|---|
| ui | ? | ? |
Declared on: line 27 of Lua/dialogs/fullscreen/hospital_policy.lua.
function UIPolicy:afterLoad(old, new)
Parameters:
| Name | Type | Description |
|---|---|---|
| old | ? | ? |
| new | ? | ? |
Overrides: UIFullscreen:afterLoad.
Declared on: line 235 of Lua/dialogs/fullscreen/hospital_policy.lua.
function UIPolicy:close()
Close the window.
Overrides: Window:close.
Declared on: line 223 of Lua/dialogs/fullscreen/hospital_policy.lua.
function UIPolicy:draw(canvas, x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| canvas | ? | ? |
| x | ? | ? |
| y | ? | ? |
Overrides: UIFullscreen:draw.
Declared on: line 121 of Lua/dialogs/fullscreen/hospital_policy.lua.
function UIPolicy:onMouseDown(code, x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| code | ? | ? |
| x | ? | ? |
| y | ? | ? |
Overrides: UIFullscreen:onMouseDown.
Declared on: line 181 of Lua/dialogs/fullscreen/hospital_policy.lua.
function UIPolicy:onMouseMove(x, y, dx, dy)
Parameters:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
| dx | ? | ? |
| dy | ? | ? |
Overrides: Window:onMouseMove.
Declared on: line 157 of Lua/dialogs/fullscreen/hospital_policy.lua.
function UIPolicy:onMouseUp(code, x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| code | ? | ? |
| x | ? | ? |
| y | ? | ? |
Overrides: Window:onMouseUp.
Declared on: line 195 of Lua/dialogs/fullscreen/hospital_policy.lua.
function UIPolicy:panelHit(x, y)
Detect which slider is clicked by the mouse.
Parameters:
| Name | Type | Description |
|---|---|---|
| x | int | X position of the mouse. |
| y | int | Y position of the mouse. |
Declared on: line 207 of Lua/dialogs/fullscreen/hospital_policy.lua.