UIElement.GetText (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 method is declared by EditBox, Image, Label and TextBase.

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


Usage

string UIElement:GetText()


Returned Value

No description available.


Source code samples

Redundant occurences have been removed.

AdvancedSetup.lua

UI/FrontEnd/GameSetup/AdvancedSetup.lua
0909
PreGame.SetMaxTurns(Controls.MaxTurnsEdit:GetText());


ChangePassword.lua

UI/InGame/ChangePassword.lua
0009
if (PreGame.TestPassword( ePlayer, Controls.OldPasswordEditBox:GetText() ) ) then
0010
if ( Controls.NewPasswordEditBox:GetText() == Controls.RetypeNewPasswordEditBox:GetText() ) then
0011
PreGame.SetPassword( ePlayer, Controls.NewPasswordEditBox:GetText(), Controls.OldPasswordEditBox:GetText() );
0085
if(   ValidateText(Controls.NewPasswordEditBox:GetText()) and
0086
ValidateText(Controls.RetypeNewPasswordEditBox:GetText()) and
0087
Controls.NewPasswordEditBox:GetText() == Controls.RetypeNewPasswordEditBox:GetText() and
0088
PreGame.TestPassword( Game.GetActivePlayer(), Controls.OldPasswordEditBox:GetText() ) ) then


ChooseReligionPopup.lua (G&K)

DLC/Expansion/UI/InGame/Popups/ChooseReligionPopup.lua
0611
local name = Controls.NewName:GetText();


CivilopediaScreen.lua

UI/Civilopedia/CivilopediaScreen.lua
6339
local searchString = Controls.SearchEditBox:GetText();


DiploCorner.lua

UI/InGame/WorldView/DiploCorner.lua
0145
local fromName = controlTable.String:GetText();
0158
toName = Locale.ConvertTextKey( "TXT_KEY_DIPLO_TO_PLAYER", controlTable.String:GetText() );
0301
Controls.ChatPull:GetButton():SetText( Controls.LengthTest:GetText() );


InstalledPanel.lua

UI/FrontEnd/Modding/InstalledPanel.lua
0615
local tooltip = v.Value.Label:GetText();


MPGameOptions.lua

UI/FrontEnd/Multiplayer/GameSetup/MPGameOptions.lua
0743
PreGame.SetMaxTurns( Controls.MaxTurnsEdit:GetText() );


MPGameSetupScreen.lua

UI/FrontEnd/Multiplayer/GameSetup/MPGameSetupScreen.lua
0045
local strGameName = Controls.NameBox:GetText();


PlayerChange.lua

UI/InGame/PlayerChange.lua
0009
if (PreGame.TestPassword( Game.GetActivePlayer(), Controls.EnterPasswordEditBox:GetText() )) then
0026
local bValid = PreGame.TestPassword( Game.GetActivePlayer(), Controls.EnterPasswordEditBox:GetText() );
0075
local bValid = PreGame.TestPassword( Game.GetActivePlayer(), Controls.EnterPasswordEditBox:GetText());


SaveMapMenu.lua

UI/InGame/Menus/SaveMapMenu.lua
0014
local newSave = Controls.NameBox:GetText();
0026
UI.SaveMap( Controls.NameBox:GetText() );
0037
local text = Controls.NameBox:GetText();


SaveMenu.lua

UI/InGame/Menus/SaveMenu.lua
0051
UI.CopyLastAutoSave( Controls.NameBox:GetText() );
0053
UI.SaveGame( Controls.NameBox:GetText() );


SetCityName.lua

UI/InGame/Popups/SetCityName.lua
0019
Network.SendRenameCity(pCity:GetID(), Controls.EditCityName:GetText());


SetCivNames.lua

UI/FrontEnd/GameSetup/SetCivNames.lua
0049
if (Controls.EditCivLeader:GetText() ~= szDefaultPlayerLeader) then
0050
PreGame.SetLeaderName( g_EditSlot, Controls.EditCivLeader:GetText());
0052
if (Controls.EditCivName:GetText() ~= szDefaultPlayerCiv) then
0053
PreGame.SetCivilizationDescription( g_EditSlot, Controls.EditCivName:GetText());
0055
if (Controls.EditCivShortName:GetText() ~= szDefaultPlayerShortCiv) then
0056
PreGame.SetCivilizationShortDescription( g_EditSlot, Controls.EditCivShortName:GetText());
0058
if (Controls.EditCivAdjective:GetText() ~= szDefaultPlayerCivAdjective) then
0059
PreGame.SetCivilizationAdjective( g_EditSlot, Controls.EditCivAdjective:GetText());
0063
PreGame.SetNickName( g_EditSlot, Controls.EditNickName:GetText() );
0065
PreGame.SetPassword( g_EditSlot, Controls.EditPassword:GetText() );
0140
if(   ValidateText(Controls.EditCivShortName:GetText()) and
0141
ValidateText(Controls.EditCivLeader:GetText()) and
0142
ValidateText(Controls.EditCivName:GetText()) and
0143
ValidateText(Controls.EditCivAdjective:GetText())) then
0146
if ( ValidateText( Controls.EditNickName:GetText()) ) then
0150
if ( ValidateText(Controls.EditPassword:GetText() ) and
0151
Controls.EditRetypePassword:GetText() ==  Controls.EditPassword:GetText() ) then
0163
if (Controls.EditPassword:GetText() ~= "" or Controls.EditRetypePassword:GetText() ~= "") then


SetUnitName.lua

UI/InGame/Popups/SetUnitName.lua
0019
Network.SendRenameUnit(pUnit:GetID(), Controls.EditUnitName:GetText());


SupportFunctions.lua

UI/SupportFunctions.lua
0007
longStr = control:GetText();


VictoryProgress.lua

UI/InGame/Popups/VictoryProgress.lua
0395
strPlayer = Controls.UNInfo:GetText();
0468
strCiv = Controls.CultureLabel:GetText();
0531
controlTable.Name:SetText(controlTable.Score:GetText());



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.