GetVolumeKnobValue (Civ5 API)

From Civilization Modding Wiki
Jump to navigationJump to search

This page is a part of the Lua and UI Reference (Civ5).


Function.png This function is a built-in global function. No include statement is needed.


Usage

int GetVolumeKnobValue(ActionType musicVolumeKnob)


Returned Value

No description available.

Parameters

musicVolumeKnob: No description available.


Source code samples

Redundant occurences have been removed.

OptionsMenu.lua

UI/Options/OptionsMenu.lua
0045
m_cachedMusicVolumeKnob = GetVolumeKnobValue(iMusicVolumeKnobID);
0046
m_cachedSFXVolumeKnob = GetVolumeKnobValue(iSFXVolumeKnobID);
0047
m_cachedSpeechVolumeKnob = GetVolumeKnobValue(iSpeechVolumeKnobID);
0048
m_cachedAmbienceVolumeKnob = GetVolumeKnobValue(iAmbienceVolumeKnobID);
0409
fRealVolume = GetVolumeKnobValue(iVolumeKnobID);
0456
Controls.MusicVolumeSlider:SetValue(   GetVolumeKnobValue(iMusicVolumeKnobID) );
0457
Controls.EffectsVolumeSlider:SetValue(   GetVolumeKnobValue(iSFXVolumeKnobID) );
0458
Controls.SpeechVolumeSlider:SetValue(   GetVolumeKnobValue(iSpeechVolumeKnobID) );
0459
Controls.AmbienceVolumeSlider:SetValue( GetVolumeKnobValue(iAmbienceVolumeKnobID) );
0461
Controls.MusicVolumeSliderValue:SetText( Locale.ConvertTextKey("TXT_KEY_OPSCREEN_MUSIC_SLIDER", math.floor(GetVolumeKnobValue(iMusicVolumeKnobID)*100) ) );
0462
Controls.EffectsVolumeSliderValue:SetText( Locale.ConvertTextKey("TXT_KEY_OPSCREEN_SF_SLIDER", math.floor(GetVolumeKnobValue(iSFXVolumeKnobID)*100) ) );
0463
Controls.SpeechVolumeSliderValue:SetText( Locale.ConvertTextKey("TXT_KEY_OPSCREEN_SPEECH_SLIDER", math.floor(GetVolumeKnobValue(iSpeechVolumeKnobID)*100) ) );
0464
Controls.AmbienceVolumeSliderValue:SetText( Locale.ConvertTextKey("TXT_KEY_OPSCREEN_AMBIANCE_SLIDER", math.floor(GetVolumeKnobValue(iAmbienceVolumeKnobID)*100) ) );



The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.