UIElement.SetValue (Civ5 API)

From Civilization Modding Wiki
Jump to: navigation, search

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


Function.png This method is declared by Slider.

This is an instance method, invoke it with a colon.


Usage

void UIElement:SetValue(string sliderValue, PlayerID value = nil)


Parameters

sliderValue: No description available.
value: No description available.


Source code samples

Redundant occurences have been removed.

AdvancedSetup.lua

UI/FrontEnd/GameSetup/AdvancedSetup.lua
0948
Controls.MinorCivsSlider:SetValue( PreGame.GetNumMinorCivs() / maxMinorCivs );
0955
Controls.MinorCivsSlider:SetValue(0 / maxMinorCivs);
0958
Controls.MinorCivsSlider:SetValue(PreGame.GetNumMinorCivs() / maxMinorCivs);


MPGameOptions.lua

UI/FrontEnd/Multiplayer/GameSetup/MPGameOptions.lua
0324
Controls.MinorCivsSlider:SetValue( 0 );
0327
Controls.MinorCivsSlider:SetValue( PreGame.GetNumMinorCivs() / #GameInfo.MinorCivilizations );


OptionsMenu.lua

UI/Options/OptionsMenu.lua
0456
Controls.MusicVolumeSlider:SetValue(   GetVolumeKnobValue(iMusicVolumeKnobID) );
0457
Controls.EffectsVolumeSlider:SetValue(   GetVolumeKnobValue(iSFXVolumeKnobID) );
0458
Controls.SpeechVolumeSlider:SetValue(   GetVolumeKnobValue(iSpeechVolumeKnobID) );
0459
Controls.AmbienceVolumeSlider:SetValue( GetVolumeKnobValue(iAmbienceVolumeKnobID) );
0479
Controls.Tooltip1TimerSlider:SetValue(OptionsManager.GetTooltip1Seconds()/1000);
0711
Controls.Tooltip1TimerSlider:SetValue(OptionsManager.GetTooltip1Seconds_Cached()/1000);


ReplayViewer.lua

UI/InGame/Popups/ReplayViewer.lua
0996
turnSlider:SetValue(sliderValue);


TurnsRemaining.lua - DLC_04 DLC

DLC/DLC_04/Scenarios/1066Scenario/TurnsRemaining.lua
0777
savedData.SetValue("TurnsBetweenBonuses", 10);


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/FallOfRomeScenario/TurnsRemaining.lua
0245
savedData.SetValue("WesternRomeCitiesCaptured", 0);
0248
savedData.SetValue("EasternRomeCitiesCaptured", 0);
0362
savedData.SetValue("HunCapturedFirstCity", 1);
0387
savedData.SetValue("WesternRomeCitiesCaptured", savedData.GetValue("WesternRomeCitiesCaptured") + 1);
0390
savedData.SetValue("EasternRomeCitiesCaptured", savedData.GetValue("EasternRomeCitiesCaptured") + 1);
2351
savedData.SetValue("InitializationComplete", 1);
2352
savedData.SetValue("HunCapturedFirstCity", 0);


TurnsRemaining.lua (G&K)

DLC/Expansion/Scenarios/MedievalScenario/TurnsRemaining.lua
0032
g_SaveData.SetValue(name, value);



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.