CorsixTH Lua Documentation

UISoundSettings Class

Declared on: line 21 of Lua/dialogs/resizables/sound_setting.lua.
Inheritance: UISoundSettings » UIResizable » Window

Method Index

Member Index

(*) only used in superclass methods
function UISoundSettings:UISoundSettings(ui, mode)

Construct new UISoundSettings window

Parameters:

NameTypeDescription
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: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:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
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:

NameTypeDescription
name ? ?

Declared on: line 428 of Lua/dialogs/resizables/sound_setting.lua.