UIAnnualReport Class
Annual Report fullscreen window shown at the start of each year.
Inheritance: UIAnnualReport » UIFullscreen » Window
Method Index
- addAward(text, award_type, amount)
- addBevelPanel(x, y, w, h, colour, highlight_colour, shadow_colour, disabled_colour) (inherited from Window)
- addColourPanel(x, y, w, h, r, g, b) (inherited from Window)
- addKeyHandler(key, handler, ...) (inherited from Window)
- addPanel(sprite_index, x, y, w, h) (inherited from Window)
- addTrophy(text, award_type, amount)
- addWindow(window) (inherited from Window)
- afterLoad(old, new) (inherited from UIFullscreen)
- beginDrag(x, y) (inherited from Window)
- bringToTop() (inherited from Window)
- changePage(page_no)
- checkTrophiesAndAwards(world)
- close() (overrides Window:close)
- draw(canvas, x, y) (overrides UIFullscreen:draw)
- drawStatisticsScreen(canvas, x, y)
- 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)
- 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)
- 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) (inherited from Window)
- onChangeLanguage() (inherited from Window)
- onChangeResolution() (inherited from UIFullscreen)
- onCursorWorldPositionChange(x, y) (inherited from Window)
- onMouseDown(button, x, y) (inherited from UIFullscreen)
- onMouseMove(x, y, dx, dy) (inherited from Window)
- onMouseUp(button, x, y) (inherited from Window)
- onTick() (inherited from Window)
- onWorldTick() (inherited from Window)
- removeAllPanels() (inherited from Window)
- removeWindow(window) (inherited from Window)
- sendToBottom(window) (inherited from Window)
- sendToTop(window) (inherited from Window)
- setActive(button, active)
- setDefaultPosition(x, y) (inherited from Window)
- setPosition(x, y) (inherited from Window)
- showAwardMotivation(text_index_to_show)
- showTrophyMotivation(text_index_to_show)
- startButtonBlinking(button_index) (inherited from Window)
- stopButtonBlinking() (inherited from Window)
- updateAwards()
Member Index
- active_button (*)
- active_scrollbar (*)
- award_background
- award_motivation
- award_won_amount
- awards
- background
- blink_counter (*)
- blinking_button (*)
- border_sprites (*)
- btn_repeat_delay (*)
- buttons (*)
- buttons_down (*)
- category (*)
- closed (*)
- cures
- cures_sort
- deaths
- deaths_sort
- default_button_sound
- draggable (*)
- dragging (*)
- esc_closes (*)
- fourth_close
- height (*)
- key_handlers (*)
- modal_class (*)
- money
- money_sort
- no_awards
- no_trophies
- panel_sprites
- panels (*)
- parent (*)
- plaque
- rep_amount
- salary
- salary_sort
- scroll
- scrollbars (*)
- second_change
- second_close
- selected_staff (*)
- staff_members (*)
- stat_background
- stat_font
- state
- stone_font
- textboxes (*)
- third_change
- third_close
- tooltip_regions (*)
- trophies
- trophy_motivation
- ui
- value
- value_sort
- visible (*)
- visitors
- visitors_sort
- width (*)
- windows (*)
- won_amount
- write_font
- x
- x_original (*)
- y
- y_original (*)
function UIAnnualReport:UIAnnualReport(ui, world)
Parameters:
Name | Type | Description |
---|---|---|
ui | ? | ? |
world | ? | ? |
Declared on: line 26 of Lua/dialogs/fullscreen/annual_report.lua.
function UIAnnualReport:addAward(text, award_type, amount)
Adds an award frame with some text if the player clicks on it.
Parameters:
Name | Type | Description |
---|---|---|
text | string | The text to show as motivation. |
award_type | string | Should be one of "reputation" or "money" |
amount | integer | How much the player got/lost. |
Declared on: line 348 of Lua/dialogs/fullscreen/annual_report.lua.
function UIAnnualReport:addTrophy(text, award_type, amount)
Adds a trophy figure with some text if the player clicks on it.
Parameters:
Name | Type | Description |
---|---|---|
text | string | The text to show as motivation. |
award_type | string | Should be one of "reputation" or "money" |
amount | integer | How much the player got/lost. |
Declared on: line 319 of Lua/dialogs/fullscreen/annual_report.lua.
function UIAnnualReport:changePage(page_no)
Changes the page of the annual report
Parameters:
Name | Type | Description |
---|---|---|
page_no | ? | The page to go to, either page 1, 2 or 3. Default is currently page 2. |
Declared on: line 468 of Lua/dialogs/fullscreen/annual_report.lua.
function UIAnnualReport:checkTrophiesAndAwards(world)
Finds out which awards and/or trophies the player has been awarded this year.
Parameters:
Name | Type | Description |
---|---|---|
world | ? | ? |
Declared on: line 163 of Lua/dialogs/fullscreen/annual_report.lua.
function UIAnnualReport:close()
Overridden close function. The game should be unpaused again when closing the dialog.
Overrides: Window:close.
Declared on: line 453 of Lua/dialogs/fullscreen/annual_report.lua.
function UIAnnualReport:draw(canvas, x, y)
Parameters:
Name | Type | Description |
---|---|---|
canvas | ? | ? |
x | ? | ? |
y | ? | ? |
Overrides: UIFullscreen:draw.
Declared on: line 502 of Lua/dialogs/fullscreen/annual_report.lua.
function UIAnnualReport:drawStatisticsScreen(canvas, x, y)
Parameters:
Name | Type | Description |
---|---|---|
canvas | ? | ? |
x | ? | ? |
y | ? | ? |
Declared on: line 561 of Lua/dialogs/fullscreen/annual_report.lua.
function UIAnnualReport:setActive(button, active)
Helper function that enables and makes visible button or table of buttons/panels.
Parameters:
Name | Type | Description |
---|---|---|
button | ? | The button or table of buttons that should be activated/deactivated. If a table is given it needs to have the is_table flag set to true. |
active | ? | Defines if the new state is active (true) or inactive (false). |
Declared on: line 437 of Lua/dialogs/fullscreen/annual_report.lua.
function UIAnnualReport:showAwardMotivation(text_index_to_show)
Activates the motivation scroll with the given text on it.
Parameters:
Name | Type | Description |
---|---|---|
text_index_to_show | ? | The index of the award to show info from. |
Declared on: line 397 of Lua/dialogs/fullscreen/annual_report.lua.
function UIAnnualReport:showTrophyMotivation(text_index_to_show)
Activates the motivation plaque with the given text on it.
Parameters:
Name | Type | Description |
---|---|---|
text_index_to_show | ? | The index of the trophy to show info from. |
Declared on: line 419 of Lua/dialogs/fullscreen/annual_report.lua.