UIElement.SetPercent (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 function is a member of ControlBase.

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


Usage

void UIElement:SetPercent(int percentDone)


Parameters

percentDone: No description available.


Source code samples

Redundant occurences have been removed.

CityBannerManager.lua

UI/InGame/CityBannerManager.lua
0292
controls.GrowthBar:SetPercent( fGrowthProgressPercent );
0293
controls.GrowthBarShadow:SetPercent( fGrowthProgressPlusThisTurnPercent );
0314
controls.ProductionBar:SetPercent( fProductionProgressPercent );
0315
controls.ProductionBarShadow:SetPercent( fProductionProgressPlusThisTurnPercent );
0850
instance.SubControls.CityBannerHealthBar:SetPercent(iHealthPercent);


CityList.lua

UI/InGame/CityList.lua
0144
instance.HealthBar:SetPercent( iHealthPercent );
0180
instance.GrowthBar:SetPercent( fGrowthProgressPercent );
0181
instance.GrowthBarShadow:SetPercent( fGrowthProgressPlusThisTurnPercent );
0353
instance.ProductionBar:SetPercent( fProductionProgressPercent );
0354
instance.ProductionBarShadow:SetPercent( fProductionProgressPlusThisTurnPercent );


CityStateDiploPopup.lua

UI/InGame/Popups/CityStateDiploPopup.lua
0209
Controls.StatusMeter:SetPercent(info.value);


CityStateStatusHelper.lua (G&K)

DLC/Expansion/UI/CityStateStatusHelper.lua
0113
posBarCtrl:SetPercent(percentFull);
0124
negBarCtrl:SetPercent(percentFull);


CityView.lua

UI/InGame/CityView/CityView.lua
0753
Controls.PeopleMeter:SetPercent( pCity:GetFood() / pCity:GrowthThreshold() );
0976
controlTable.GPMeter:SetPercent( percent );
1384
Controls.CultureMeter:SetPercent( percentComplete );
1494
Controls.HealthMeter:SetPercent(iHealthPercent);


DiploList.lua

UI/InGame/DiploList.lua
0479
controlTable.StatusMeter:SetPercent(info.value);


DiploRelationships.lua

UI/InGame/Popups/DiploRelationships.lua
0484
pStack.StatusMeter:SetPercent(info.value);


EconomicGeneralInfo.lua

UI/InGame/Popups/EconomicGeneralInfo.lua
0104
instance.HealthBar:SetPercent( pct );


GPList.lua

UI/InGame/GPList.lua
0146
instance.GPMeter:SetPercent( iProgress / iThreshold );
0165
Controls.GGMeter:SetPercent( fProgress / fThreshold );


GPList.lua (G&K)

DLC/Expansion/UI/InGame/GPList.lua
0173
Controls.GAMeter:SetPercent( fProgress / fThreshold );


MilitaryOverview.lua

UI/InGame/Popups/MilitaryOverview.lua
0089
Controls.GPMeter:SetPercent( fProgress / fThreshold );


ProductionPopup.lua

UI/InGame/Popups/ProductionPopup.lua
0218
Controls.GrowthBar:SetPercent( city:GetFood() / city:GrowthThreshold() );


SocialPolicyPopup.lua

UI/InGame/Popups/SocialPolicyPopup.lua
0528
Controls.UtopiaBar:SetPercent( percentDone );


UnitFlagManager.lua

UI/InGame/UnitFlagManager.lua
0436
self.m_Instance.HealthBar:SetPercent( healthPercent );


UnitMemberOverlay.lua

UI/InGame/UnitMemberOverlay.lua
0092
o.m_Instance.TargetColor:SetPercent( 100 );


UnitPanel.lua

UI/InGame/WorldView/UnitPanel.lua
0375
Controls.WorkerProgressBar:SetPercent( percent );
0426
Controls.XPMeter:SetPercent( iExperience / iExperienceNeeded );


VictoryProgress.lua

UI/InGame/Popups/VictoryProgress.lua
0310
Controls.TechProgress:SetPercent(g_PreReqsAcquired / totalPreReqs);



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.