UIElement.GetButton (Civ5 API)

From Civilization Modding Wiki
Revision as of 14:38, 20 September 2012 by DonQuich (talk | contribs) (Bot update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to 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

Button UIElement:GetButton()


Returned Value

No description available.


Source code samples

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

AdvancedSetup.lua

UI/FrontEnd/GameSetup/AdvancedSetup.lua
0099
local dropDownButton = gameOption.OptionDropDown:GetButton();
0491
pullDown:GetButton():LocalizeAndSetText(era.Description);
0531
pullDown:GetButton():SetToolTipString( Locale.ConvertTextKey( gameSpeed.Help ) );
0539
Controls.GameSpeedPullDown:GetButton():SetToolTipString( Locale.ConvertTextKey( info.Help ) );
0564
pullDown:GetButton():LocalizeAndSetText(handicap.Description);
0565
pullDown:GetButton():LocalizeAndSetToolTip(handicap.Help);
0574
Controls.HandicapPullDown:GetButton():LocalizeAndSetToolTip(info.Help);
0605
pullDown:GetButton():LocalizeAndSetToolTip("TXT_KEY_RANDOM_MAP_SIZE_HELP");
0839
pullDown:GetButton():LocalizeAndSetToolTip("TXT_KEY_MAP_EARTH_HELP");
0845
pullDown:GetButton():LocalizeAndSetToolTip(row.Description or "");
0872
pullDown:GetButton():LocalizeAndSetText(name);
0887
pullDown:GetButton():LocalizeAndSetText("TXT_KEY_RANDOM_MAP_SCRIPT");
1139
Controls.CivPulldown:GetButton():LocalizeAndSetText("TXT_KEY_RANDOM_LEADER_CIV", Locale.ConvertTextKey(leaderDescription), Locale.ConvertTextKey(civ.ShortDescription));


DiploCorner.lua

UI/InGame/WorldView/DiploCorner.lua
0297
Controls.ChatPull:GetButton():SetText( Controls.LengthTest:GetText() );


MiniMapPanel.lua

UI/InGame/WorldView/MiniMapPanel.lua
0204
Controls.OverlayDropDown:GetButton():SetText(Locale.ConvertTextKey( g_Overlays[1] ));
0270
Controls.IconDropDown:GetButton():SetText(Locale.ConvertTextKey( g_IconModes[1] ));


MPGameOptions.lua

UI/FrontEnd/Multiplayer/GameSetup/MPGameOptions.lua
0180
Controls.MapSizePullDown:GetButton():SetDisabled(true);
0253
pullDown:GetButton():SetText("[COLOR_RED]" .. fileTitle .. "[ENDCOLOR]");
0254
pullDown:GetButton():LocalizeAndSetToolTip(mapScriptFileName);
0304
Controls.MapSizePullDown:GetButton():SetDisabled( not bCanEdit );
0311
Controls.MapSizePullDown:GetButton():LocalizeAndSetText( info.Description );
0312
Controls.MapSizePullDown:GetButton():LocalizeAndSetToolTip( info.Help );
0334
Controls.GameSpeedPullDown:GetButton():LocalizeAndSetToolTip( info.Help );
0339
Controls.EraPull:GetButton():LocalizeAndSetText( info.Description );
0427
Controls.GameSpeedPullDown:GetButton():LocalizeAndSetText(GameInfo.GameSpeeds[id].Description);
0468
Controls.MapSizePullDown:GetButton():LocalizeAndSetText(GameInfo.Worlds[id].Description);
0469
Controls.MapSizePullDown:GetButton():LocalizeAndSetToolTip(GameInfo.Worlds[id].Help);


OptionsMenu.lua

UI/Options/OptionsMenu.lua
0522
Controls.LanguagePull:GetButton():SetText(Locale.GetCurrentLanguage().DisplayName);
0675
Controls.BindMousePull:GetButton():SetText( m_BindMouseText[ OptionsManager.GetBindMouseMode_Cached() ] );
0681
Controls.TutorialPull:GetButton():SetText( m_TutorialLevelText[ iTutorialLevel ] );
0684
Controls.SpokenLanguagePull:GetButton():SetText(Locale.GetCurrentSpokenLanguage().DisplayName); --TODO: make this work like its friends -KS
0731
Controls.FSResolutionPull:GetButton():SetText( kResInfo.Width .. "x" .. kResInfo.Height .. "   " .. kResInfo.Refresh .. " Hz" );
0735
Controls.WResolutionPull:GetButton():SetText( x .. "x" .. y );
0736
Controls.MSAAPull:GetButton():SetText( m_MSAAText[ m_MSAAInvMap[OptionsManager.GetAASamples_Cached()] ] );
0741
Controls.LeaderPull:GetButton():SetText( m_LeaderText[ OptionsManager.GetLeaderQuality_Cached() ] );
0742
Controls.OverlayPull:GetButton():SetText( m_OverlayText[ OptionsManager.GetOverlayLevel_Cached() ] );
0743
Controls.ShadowPull:GetButton():SetText( m_ShadowText[ OptionsManager.GetShadowLevel_Cached() ] );
0745
Controls.TerrainDetailPull:GetButton():SetText( m_TerrainDetailText[ OptionsManager.GetTerrainDetailLevel_Cached() ] );
1064
Controls.FOWPull:GetButton():SetText( m_FOWText[ level ] );
1080
Controls.TerrainTessPull:GetButton():SetText( m_TerrainTessText[ level ] );
1096
Controls.WaterPull:GetButton():SetText( m_WaterText[ level ] );
1104
Controls.TextureQualityPull:GetButton():SetText( m_TextureQualityText[ level ] );
1131
Controls.WResolutionPull:GetButton():SetText( kResInfo.Width .. "x" .. kResInfo.Height );


ReligionOverview.lua (G&K)

DLC/Expansion/UI/InGame/Popups/ReligionOverview.lua
0419
automaticPurchasePullDown:GetButton():LocalizeAndSetText("TXT_KEY_RO_AUTO_FAITH_PROMPT");
0425
automaticPurchasePullDown:GetButton():LocalizeAndSetText("TXT_KEY_RO_AUTO_FAITH_PURCHASE_GREAT_PERSON", gpString);


ReplayViewer.lua

UI/InGame/Popups/ReplayViewer.lua
1097
local replayInfoPulldownButton = Controls.ReplayInfoPulldown:GetButton();


StagingRoom.lua

UI/FrontEnd/Multiplayer/StagingRoom.lua
0157
slotInstance.InvitePulldown:GetButton():LocalizeAndSetText( "TXT_KEY_AI_NICKNAME" );
0387
slotInstance.InvitePulldown:GetButton():SetText( playerName );
0388
slotInstance.PlayerNamePulldown:GetButton():SetText( playerName );


UITestMenu.lua

UI/FrontEnd/UITestMenu.lua
0129
Controls.PullDown:GetButton():SetText( one );



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.