UIElement.SetText (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 EditBox, Grid, GridButton, Image, Label, Slider, TextBase and TextButton.

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


Usage

void UIElement:SetText(string localizedString)


Parameters

localizedString: No description available.


Source code samples

Too many occurences. Only 50 out of 2489 are listed.

AdvisorCounselPopup.lua

UI/InGame/Popups/AdvisorCounselPopup.lua
0127
Controls.MACounselText:SetText(strText);


ChangePassword.lua

UI/InGame/ChangePassword.lua
0107
Controls.RetypeNewPasswordEditBox:SetText( "" );


ChoosePantheonPopup.lua (G&K)

DLC/Expansion/UI/InGame/Popups/ChoosePantheonPopup.lua
0104
itemInstance.Description:SetText(pantheon.Description);


ChooseReligionPopup.lua (G&K)

DLC/Expansion/UI/InGame/Popups/ChooseReligionPopup.lua
0366
Controls.FollowerBeliefDescription:SetText(Locale.Lookup(belief.Description));


CityView.lua

UI/InGame/CityView/CityView.lua
0820
Controls.ProductionButtonLabel:SetText( Locale.ConvertTextKey( "TXT_KEY_CITYVIEW_CHANGE_PROD") );
1116
Controls.SpecialBuildingsHeaderLabel:SetText(localizedLabel);
1299
Controls.ResourceDemandedString:SetText(szText);
1855
controlTable.BuyPlotAnchoredButtonLabel:SetText( "[COLOR_WARNING_TEXT]"..tostring(iPlotCost).."[ENDCOLOR]" );


CityView.lua (G&K)

DLC/Expansion/UI/InGame/CityView/CityView.lua
1497
Controls.EndTurnText:SetText(Locale.ConvertTextKey("TXT_KEY_CITYVIEW_RETURN_TO_ESPIONAGE"));


CivilopediaScreen.lua

UI/Civilopedia/CivilopediaScreen.lua
1582
Controls.ArticleID:SetText( Locale.ConvertTextKey( "TXT_KEY_PEDIA_CIVILIZATIONS_PAGE_LABEL" ));
4745
thisListInstance.ListItemLabel:SetText( Locale.ConvertTextKey( "TXT_KEY_PEDIA_UNITS_PAGE_LABEL" ));


Credits.lua

UI/FrontEnd/Credits.lua
0071
majorTitle.Text:SetText(creditLine);


DebugMenu.lua

UI/InGame/DebugMenu.lua
0235
Controls.ParticleEffectsStats_Label4:SetText("Rendered Particles: "      .. tostring(responseData.NumRenderedParticles));


DebugMode.lua

UI/InGame/DebugMode.lua
0477
Controls.CityPlayer_Label:SetText(" " .. g_iCurrPlayer .. " " );
0634
Controls.UnitVariableValue_Label:SetText( string.format("%.1f", g_fVariableValue) );


Demographics.lua

UI/InGame/Popups/Demographics.lua
0146
instance.Rank:SetText( Locale.ToNumber(GetRank( m_PopulationTable, iPlayer ), "#") );
0370
instance.Average:SetText( Locale.ToNumber( GetAverage( m_ApprovalTable, iPlayer ), "#'%'" ) );


DiploCurrentDeals.lua

UI/InGame/Popups/DiploCurrentDeals.lua
0126
Controls.CurrentDealsButton:SetText( "[ICON_PLUS]" .. Locale.ConvertTextKey( "{TXT_KEY_DO_CURRENT_DEALS:upper}" ) );
0153
Controls.TurnStart:SetText( Locale.ConvertTextKey( "TXT_KEY_DO_ON_TURN", iBeginTurn ) );


DiploGlobalRelationships.lua

UI/InGame/Popups/DiploGlobalRelationships.lua
0098
textControls.Text:SetText(strText);


DiploList.lua

UI/InGame/DiploList.lua
0448
controlTable.StatusText:SetText( strDiploState);


EconomicGeneralInfo.lua

UI/InGame/Popups/EconomicGeneralInfo.lua
0359
Controls.TileExpenseValue:SetText( Locale.ToNumber( pPlayer:GetImprovementGoldMaintenance(), "#.##" ) );
0362
Controls.DiploExpenseValue:SetText( Locale.ToNumber( pPlayer:GetGoldPerTurnFromDiplomacy(), "#.##" ) );


EspionageOverview.lua (G&K)

DLC/Expansion/UI/InGame/Popups/EspionageOverview.lua
0593
agentEntry.AgentActivity:SetText(v.AgentActivity);
1490
instance.CivilizationName:SetText(v.From);


FoRScenarioLoadScreen.lua (G&K)

DLC/Expansion/Scenarios/FallOfRomeScenario/FoRScenarioLoadScreen.lua
0293
Controls.BonusDescription:SetText( "" );


HappinessInfo.lua

UI/InGame/Popups/HappinessInfo.lua
0527
Controls.OPopulationUnhappinessTitle:SetText(Locale.ConvertTextKey("TXT_KEY_OCCUPIED_POP_UNHAPPINESS", iOccupiedPop));


InstalledPanel.lua

UI/FrontEnd/Modding/InstalledPanel.lua
0547
detailValue.Label:SetText(value or "");


LoadMenu.lua

UI/FrontEnd/LoadMenu.lua
0243
Controls.GameType:SetText( Locale.ConvertTextKey("TXT_KEY_MULTIPLAYER_HOTSEAT_GAME") );


MPGameOptions.lua

UI/FrontEnd/Multiplayer/GameSetup/MPGameOptions.lua
0419
controlTable.Button:SetText( Locale.ConvertTextKey( v.Description ) );


OptionsMenu.lua

UI/Options/OptionsMenu.lua
0226
Controls.CountdownTimer:SetText( "20" );
0379
Controls.TitleLabel:SetText( m_PanelNames[ which ] );
0522
Controls.LanguagePull:GetButton():SetText(Locale.GetCurrentLanguage().DisplayName);


ProductionPopup.lua

UI/InGame/Popups/ProductionPopup.lua
0174
Controls.PurchaseIcon:SetText( "[ICON_PRODUCTION]" );
0692
Controls[controlName]:SetText( Locale.ConvertTextKey( thisUnitInfo.Description ) );


ResourceList.lua

UI/InGame/ResourceList.lua
0136
instance.TradeInfo:SetText( strTradeInfo );


SaveMenu.lua

UI/InGame/Menus/SaveMenu.lua
0045
Controls.Message:SetText( Locale.ConvertTextKey("TXT_KEY_OVERWRITE_TXT") );
0166
Controls.NameBox:SetText( entry.DisplayName );


SetCivNames.lua

UI/FrontEnd/GameSetup/SetCivNames.lua
0243
Controls.EditRetypePassword:SetText( name );


SupportFunctions.lua

UI/SupportFunctions.lua
0022
control:SetText(trailingText);


TechPopup.lua

UI/InGame/TechPopup.lua
0218
thisTechButtonInstance.TechQueueLabel:SetText( tostring( queuePosition-1 ) );


TechTree.lua

UI/InGame/TechTree/TechTree.lua
0377
thisEraBlockInstance.CurrentLabel:SetText( localizedLabel );


TerrainPanel.lua

UI/InGame/TerrainPanel.lua
0040
Controls.WaterNoiseScale_Label:SetText(g_iWaterNoiseScale);


TradeLogic.lua

UI/InGame/WorldView/TradeLogic.lua
0595
Controls.CancelButton:SetText( Locale.ConvertTextKey( "TXT_KEY_DIPLO_REFUSE" ));
0987
Controls.ThemCiv:SetText( "(" .. Locale.ConvertTextKey( GameInfo.Civilizations[ g_pThem:GetCivilizationType() ].ShortDescription ) .. ")" );
1685
Controls.UsTableGoldPerTurnButton:SetText( strString );


VictoryProgress.lua

UI/InGame/Popups/VictoryProgress.lua
0182
Controls.Tech:SetText(pPlayer:GetScoreFromTechs());
0739
controlTable.LiberatedCivs:SetText(libCiv);


VictoryStatus.lua (G&K)

DLC/Expansion/Scenarios/SteampunkScenario/VictoryStatus.lua
0096
Controls.HelpLabel:SetText(sHelpText);


WhosWinningPopup.lua

UI/InGame/Popups/WhosWinningPopup.lua
0288
controlTable.PlayerNameText:SetText(strName);



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.