https://modiki.civfanatics.com/index.php?title=GetVolumeKnobValue_(Civ5_API)&feed=atom&action=history
GetVolumeKnobValue (Civ5 API) - Revision history
2024-03-29T07:38:41Z
Revision history for this page on the wiki
MediaWiki 1.38.2
https://modiki.civfanatics.com/index.php?title=GetVolumeKnobValue_(Civ5_API)&diff=10441&oldid=prev
DonQuich: Bot update
2012-09-19T16:58:20Z
<p>Bot update</p>
<p><b>New page</b></p><div>{{Civ5 API Beta Banner}}<br />
''This page is a part of the [[Lua and UI Reference (Civ5)]].''<br/><br />
<br />
<br />
<br />
{{TypeInfos5|Function.png|This function is a built-in global function. No <code>include</code> statement is needed.<br />
}}<br />
<br />
<br />
=Usage=<br />
<code>'''int''' GetVolumeKnobValue<b>(</b>{{Type5|ActionType}} musicVolumeKnob<b>)</b></code><br />
<br />
<br />
'''Returned Value'''<br />
:No description available.<br />
'''Parameters'''<br />
:{|<br />
|-<br />
|valign="top" style="padding-right:6px;"|musicVolumeKnob:<br />
|valign="top"| ''No description available.''<br />
|}<br />
<br />
<br />
=Source code samples=<br />
''Redundant occurences have been removed.''<br />
<br />
{{PseudoH4|OptionsMenu.lua}}<br />
:<code>UI/Options/OptionsMenu.lua</code><br />
:{{CodeBegin5}}<br />
{{CodeLine5|0045}}<syntaxhighlight lang="lua">m_cachedMusicVolumeKnob = GetVolumeKnobValue(iMusicVolumeKnobID);</syntaxhighlight><br />
{{CodeLine5|0046}}<syntaxhighlight lang="lua">m_cachedSFXVolumeKnob = GetVolumeKnobValue(iSFXVolumeKnobID);</syntaxhighlight><br />
{{CodeLine5|0047}}<syntaxhighlight lang="lua">m_cachedSpeechVolumeKnob = GetVolumeKnobValue(iSpeechVolumeKnobID);</syntaxhighlight><br />
{{CodeLine5|0048}}<syntaxhighlight lang="lua">m_cachedAmbienceVolumeKnob = GetVolumeKnobValue(iAmbienceVolumeKnobID);</syntaxhighlight><br />
{{CodeBreak5}}<br />
{{CodeLine5|0409}}<syntaxhighlight lang="lua">fRealVolume = GetVolumeKnobValue(iVolumeKnobID);</syntaxhighlight><br />
{{CodeBreak5}}<br />
{{CodeLine5|0456}}<syntaxhighlight lang="lua">Controls.MusicVolumeSlider:SetValue( GetVolumeKnobValue(iMusicVolumeKnobID) );</syntaxhighlight><br />
{{CodeLine5|0457}}<syntaxhighlight lang="lua">Controls.EffectsVolumeSlider:SetValue( GetVolumeKnobValue(iSFXVolumeKnobID) );</syntaxhighlight><br />
{{CodeLine5|0458}}<syntaxhighlight lang="lua">Controls.SpeechVolumeSlider:SetValue( GetVolumeKnobValue(iSpeechVolumeKnobID) );</syntaxhighlight><br />
{{CodeLine5|0459}}<syntaxhighlight lang="lua">Controls.AmbienceVolumeSlider:SetValue( GetVolumeKnobValue(iAmbienceVolumeKnobID) );</syntaxhighlight><br />
{{CodeBreak5}}<br />
{{CodeLine5|0461}}<syntaxhighlight lang="lua">Controls.MusicVolumeSliderValue:SetText( Locale.ConvertTextKey("TXT_KEY_OPSCREEN_MUSIC_SLIDER", math.floor(GetVolumeKnobValue(iMusicVolumeKnobID)*100) ) );</syntaxhighlight><br />
{{CodeLine5|0462}}<syntaxhighlight lang="lua">Controls.EffectsVolumeSliderValue:SetText( Locale.ConvertTextKey("TXT_KEY_OPSCREEN_SF_SLIDER", math.floor(GetVolumeKnobValue(iSFXVolumeKnobID)*100) ) );</syntaxhighlight><br />
{{CodeLine5|0463}}<syntaxhighlight lang="lua">Controls.SpeechVolumeSliderValue:SetText( Locale.ConvertTextKey("TXT_KEY_OPSCREEN_SPEECH_SLIDER", math.floor(GetVolumeKnobValue(iSpeechVolumeKnobID)*100) ) );</syntaxhighlight><br />
{{CodeLine5|0464}}<syntaxhighlight lang="lua">Controls.AmbienceVolumeSliderValue:SetText( Locale.ConvertTextKey("TXT_KEY_OPSCREEN_AMBIANCE_SLIDER", math.floor(GetVolumeKnobValue(iAmbienceVolumeKnobID)*100) ) );</syntaxhighlight><br />
{{CodeEnd5}}<br />
<br />
<br />
<br />
<br />
{{Civ5 API Footer}}<br />
[[Category:Civ5 Methods and Functions|GetVolumeKnobValue]]</div>
DonQuich