UISoundSettings Class
Inheritance: UISoundSettings » UIResizable » 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) (inherited from UIResizable)
- beginDrag(x, y) (inherited from Window)
- beginResize(x, y, mode) (inherited from UIResizable)
- bringToTop() (inherited from Window)
- buttonAudioGlobal()
- buttonBack()
- buttonBrowseForSoundfont()
- buttonJukebox()
- close() (overrides Window:close)
- closeAllDropdowns()
- draw(canvas, x, y) (inherited from UIResizable)
- dropdownMidiApi(activate)
- dropdownMidiPort(activate)
- dropdownVolume(activate, btn)
- 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)
- 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)
- reinitAudio()
- removeAllPanels() (inherited from Window)
- removeKeyHandler(keys) (inherited from Window)
- removeWindow(window) (inherited from Window)
- selectAnnouncementVolume(index)
- selectMidiApi(index)
- selectMidiPort(index)
- selectMusicVolume(index)
- selectSoundVolume(index)
- selectSoundfont(name)
- 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)
Member Index
- active_button (*)
- active_scrollbar (*)
- announcement_volume_button
- announcement_volume_panel
- app
- apply_ui_scale (*)
- background_panel (*)
- blink_counter (*)
- blinking_button (*)
- border_pos (*)
- border_sprites (*)
- btn_repeat_delay (*)
- buttons (*)
- buttons_down (*)
- closed (*)
- colour (*)
- cursor_x (*)
- cursor_y (*)
- default_api_panels
- default_button_sound
- draggable (*)
- dragging (*)
- esc_closes
- height (*)
- hotkeyboxes (*)
- key_handlers (*)
- midi_api_button
- midi_api_dropdown
- midi_api_options
- midi_api_panel
- midi_api_panels
- midi_port_button
- midi_port_dropdown
- midi_port_options
- midi_port_panel
- min_height (*)
- min_width (*)
- modal_class
- mode
- music_volume_button
- music_volume_panel
- on_top
- onoff_button
- onoff_panel
- panel_sprites (*)
- panels (*)
- parent (*)
- resizable
- scrollbars (*)
- sound_volume_button
- sound_volume_panel
- textboxes (*)
- tooltip_regions (*)
- ui
- visible (*)
- volume_dropdown
- volume_options
- width (*)
- windows (*)
- x (*)
- x_original (*)
- y (*)
- y_original (*)
function UISoundSettings:UISoundSettings(ui, mode)
Construct new UISoundSettings window
Parameters:
| Name | Type | Description |
|---|---|---|
| ui | UI | The game ui |
| mode | string | 'menu' or 'game', depending on whether the window is displayed from the main menu or in game. |
Declared on: line 67 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:buttonAudioGlobal()
Click action for the global audio toggle
Turns all game audio off or on.
Declared on: line 252 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:buttonBack()
Callback for back button
Opens the UIOptions window again.
Declared on: line 444 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:buttonBrowseForSoundfont()
Button handler for soundfont
Opens a file chooser dialog for selecting a soundfont.
Declared on: line 421 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:buttonJukebox()
Callback for Jukebox button
Opens the jukebox window.
Declared on: line 436 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:close()
Close window
Overrides: Window:close.
Declared on: line 452 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:closeAllDropdowns()
Close any UIDropdown that may be open
Declared on: line 245 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:dropdownMidiApi(activate)
Click action for midi api button
Shows a drop down list of MIDI API options that are supported by the
current build.
Parameters:
| Name | Type | Description |
|---|---|---|
| activate | ? | true when the control is is activated, false when deactivated |
Declared on: line 294 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:dropdownMidiPort(activate)
Click action for the midi port button
Shows a drop down list of the MIDI ports available for the selected API.
Parameters:
| Name | Type | Description |
|---|---|---|
| activate | ? | true when the control is is activated, false when deactivated |
Declared on: line 314 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:dropdownVolume(activate, btn)
Click action for any of the audio buttons
Displays a drop down of volume options.
Parameters:
| Name | Type | Description |
|---|---|---|
| activate | bool | true when the control is is activated, false when deactivated |
| btn | UIButton | the button clicked to fire this event |
Declared on: line 262 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:reinitAudio()
Reinitialize the game audio
Allows all the changed audio settings to take effect by shutting down the
game audio and starting it up again.
Declared on: line 233 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:selectAnnouncementVolume(index)
Triggered when an announcement volume option is selected from the dropdown
Sets the announcement volume or turns announcements off in the config.
Parameters:
| Name | Type | Description |
|---|---|---|
| index | number | the index of the option selected |
Declared on: line 348 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:selectMidiApi(index)
Triggered when a MIDI API is selected from the dropdown
Sets the MIDI API in the config and resets the MIDI port selection,
since the MIDI port is specific to the selected API.
Parameters:
| Name | Type | Description |
|---|---|---|
| index | number | the index of the option selected |
Declared on: line 382 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:selectMidiPort(index)
Triggered when a MIDI port is selected from the dropdown
Sets the MIDI port and resets the audio.
Parameters:
| Name | Type | Description |
|---|---|---|
| index | number | the index of the option selected |
Declared on: line 411 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:selectMusicVolume(index)
Triggered when a music volume option is selected from the dropdown
Sets the music volume or turns announcements off in the config.
Parameters:
| Name | Type | Description |
|---|---|---|
| index | number | the index of the option selected |
Declared on: line 363 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:selectSoundVolume(index)
Triggered when a sound volume option is selected from the dropdown
Sets the sound volume or turns sound off in the config.
Parameters:
| Name | Type | Description |
|---|---|---|
| index | number | the index of the option selected |
Declared on: line 333 of Lua/dialogs/resizables/sound_setting.lua.
function UISoundSettings:selectSoundfont(name)
Callback when a soundfont is chosen
Saves the soundfont and reinitializes audio.
Parameters:
| Name | Type | Description |
|---|---|---|
| name | ? | ? |
Declared on: line 428 of Lua/dialogs/resizables/sound_setting.lua.