UIOptions Class
Options window used in the main menu and ingame.
Inheritance: UIOptions » UIResizable » Window
Method Index
- _getOptionYPos()
- _processWindowResizeEvent()
- _startNewColumn()
- 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) (inherited from UIResizable)
- beginDrag(x, y) (inherited from Window)
- beginResize(x, y, mode) (inherited from UIResizable)
- bringToTop() (inherited from Window)
- buttonBack()
- buttonCustomise()
- buttonFolder()
- buttonFullscreen()
- buttonHotkey()
- buttonMouseCapture()
- buttonOriginalAspectRatio()
- buttonScrollSpeed()
- buttonShiftScrollSpeed()
- buttonSound()
- buttonUpdates()
- buttonZoomSpeed()
- checkForAvailableLanguages()
- close() (overrides Window:close)
- draw(canvas, x, y) (inherited from UIResizable)
- dropdownAutosaveFrequency(activate)
- dropdownCursorScale(activate)
- dropdownLanguage(activate)
- dropdownUIScale(activate)
- dropdownWindowSize(activate)
- 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)
- hitTest(x, y) (inherited from UIResizable)
- hitTestCorners(x, y) (inherited from UIResizable)
- 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 Window)
- onChangeWindowSize()
- onCursorWorldPositionChange(x, y) (inherited from Window)
- onMouseDown(button, x, y) (inherited from UIResizable)
- onMouseMove(x, y, dx, dy) (inherited from Window)
- onMouseUp(button, x, y) (inherited from Window)
- onMouseWheel(x, y) (inherited from Window)
- onTick() (inherited from Window)
- onWorldTick() (inherited from Window)
- overrideMinSize(min_width, min_height) (inherited from UIResizable)
- removeAllPanels() (inherited from Window)
- removeKeyHandler(keys) (inherited from Window)
- removeWindow(window) (inherited from Window)
- selectAutosaveFrequency(number)
- selectCursorScale(number)
- selectLanguage(number)
- selectUIScale(number)
- selectWindowSize(number)
- sendToBottom(window) (inherited from Window)
- sendToTop(window) (inherited from Window)
- setColour(colour) (inherited from UIResizable)
- setDefaultPosition(x, y) (inherited from Window)
- setPosition(x, y) (inherited from Window)
- setSize(width, height) (inherited from UIResizable)
- startButtonBlinking(button_index) (inherited from Window)
- stopButtonBlinking() (inherited from Window)
- toggleUpdateCheck()
- updateUIScaleAvailabilityState()
Member Index
- _current_option_index
- active_button (*)
- active_scrollbar (*)
- app
- apply_ui_scale (*)
- aspect_button
- aspect_panel
- autosave_dropdown
- autosave_frequency_button
- autosave_frequency_panel
- available_cursor_scales
- available_languages
- available_ui_scales
- available_window_sizes
- background_panel (*)
- blink_counter (*)
- blinking_button (*)
- border_pos (*)
- border_sprites (*)
- btn_repeat_delay (*)
- builtin_font
- buttons (*)
- buttons_down (*)
- closed (*)
- colour (*)
- column_count
- cursor_scale_button
- cursor_scale_dropdown
- cursor_scale_panel
- cursor_x (*)
- cursor_y (*)
- default_button_sound
- draggable (*)
- dragging (*)
- esc_closes
- fullscreen_button
- fullscreen_panel
- height (*)
- hotkeyboxes (*)
- key_handlers (*)
- language_button
- language_dropdown
- language_panel
- min_height (*)
- min_width (*)
- modal_class
- mode
- mouse_capture_button
- mouse_capture_panel
- on_top
- panel_sprites (*)
- panels (*)
- parent (*)
- resizable
- scale_ui_button
- scale_ui_dropdown
- scale_ui_panel
- scrollbars (*)
- scrollspeed_button
- scrollspeed_panel
- shift_scrollspeed_button
- shift_scrollspeed_panel
- textboxes (*)
- tooltip_regions (*)
- ui
- updates_button
- updates_panel
- visible (*)
- width (*)
- window_size_button
- window_size_dropdown
- window_size_panel
- windows (*)
- x (*)
- x_original (*)
- y (*)
- y_original (*)
- zoomspeed_button
- zoomspeed_panel
function UIOptions:UIOptions(ui, mode)
Parameters:
| Name | Type | Description |
|---|---|---|
| ui | ? | ? |
| mode | ? | ? |
Declared on: line 168 of Lua/dialogs/resizables/options.lua.
function UIOptions:_getOptionYPos()
Private functions
- Calculates the Y position for the dialog box in the option menu
and increments along the current position for the next element
@return The Y position to place the element at
Declared on: line 44 of Lua/dialogs/resizables/options.lua.
function UIOptions:_processWindowResizeEvent()
Handle required button changes from a window resize event from the user (via UI
or adjusting window boundaries)
Declared on: line 652 of Lua/dialogs/resizables/options.lua.
function UIOptions:_startNewColumn()
Resets the index to start at the top of a new column, below the title,
for the Y position calculation.
Declared on: line 61 of Lua/dialogs/resizables/options.lua.
function UIOptions:buttonMouseCapture()
Declared on: line 585 of Lua/dialogs/resizables/options.lua.
function UIOptions:buttonOriginalAspectRatio()
Declared on: line 575 of Lua/dialogs/resizables/options.lua.
function UIOptions:buttonShiftScrollSpeed()
Declared on: line 625 of Lua/dialogs/resizables/options.lua.
function UIOptions:buttonUpdates()
Function handles button toggle of checking for updates
Declared on: line 557 of Lua/dialogs/resizables/options.lua.
function UIOptions:checkForAvailableLanguages()
Declared on: line 382 of Lua/dialogs/resizables/options.lua.
function UIOptions:close()
Overrides: Window:close.
Declared on: line 660 of Lua/dialogs/resizables/options.lua.
function UIOptions:dropdownAutosaveFrequency(activate)
Parameters:
| Name | Type | Description |
|---|---|---|
| activate | ? | ? |
Declared on: line 527 of Lua/dialogs/resizables/options.lua.
function UIOptions:dropdownCursorScale(activate)
Parameters:
| Name | Type | Description |
|---|---|---|
| activate | ? | ? |
Declared on: line 484 of Lua/dialogs/resizables/options.lua.
function UIOptions:dropdownLanguage(activate)
Parameters:
| Name | Type | Description |
|---|---|---|
| activate | ? | ? |
Declared on: line 404 of Lua/dialogs/resizables/options.lua.
function UIOptions:dropdownUIScale(activate)
Parameters:
| Name | Type | Description |
|---|---|---|
| activate | ? | ? |
Declared on: line 466 of Lua/dialogs/resizables/options.lua.
function UIOptions:dropdownWindowSize(activate)
Parameters:
| Name | Type | Description |
|---|---|---|
| activate | ? | ? |
Declared on: line 429 of Lua/dialogs/resizables/options.lua.
function UIOptions:onChangeWindowSize()
Declared on: line 647 of Lua/dialogs/resizables/options.lua.
function UIOptions:selectAutosaveFrequency(number)
Parameters:
| Name | Type | Description |
|---|---|---|
| number | ? | ? |
Declared on: line 544 of Lua/dialogs/resizables/options.lua.
function UIOptions:selectCursorScale(number)
Parameters:
| Name | Type | Description |
|---|---|---|
| number | ? | ? |
Declared on: line 520 of Lua/dialogs/resizables/options.lua.
function UIOptions:selectLanguage(number)
Parameters:
| Name | Type | Description |
|---|---|---|
| number | ? | ? |
Declared on: line 421 of Lua/dialogs/resizables/options.lua.
function UIOptions:selectUIScale(number)
Parameters:
| Name | Type | Description |
|---|---|---|
| number | ? | ? |
Declared on: line 511 of Lua/dialogs/resizables/options.lua.
function UIOptions:selectWindowSize(number)
Parameters:
| Name | Type | Description |
|---|---|---|
| number | ? | ? |
Declared on: line 447 of Lua/dialogs/resizables/options.lua.
function UIOptions:toggleUpdateCheck()
Changes check for update setting to on/of
Declared on: line 551 of Lua/dialogs/resizables/options.lua.
function UIOptions:updateUIScaleAvailabilityState()
Check if UI scale scale button should be enabled, and update the tooltip.
Declared on: line 502 of Lua/dialogs/resizables/options.lua.