UIElement.GetSizeX (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 ControlBase.

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


Usage

int UIElement:GetSizeX()


Returned Value

No description available.


Source code samples

Redundant occurences have been removed.

CityBannerManager.lua

UI/InGame/CityBannerManager.lua
0750
local iWidth = BannerInstance.CityName:GetSizeX();


CityBannerManager.lua (G&K)

DLC/Expansion/UI/InGame/CityBannerManager.lua
0736
local iWidth = BannerInstance.NameStack:GetSizeX();


CityView.lua

UI/InGame/CityView/CityView.lua
0721
local cityNameSize = (math.abs(Controls.NextCityButton:GetOffsetX()) * 2) - (Controls.PrevCityButton:GetSizeX());
0724
cityNameSize = cityNameSize - Controls.CityCapitalIcon:GetSizeX();
1300
Controls.ResourceDemandedBox:SetSizeX(Controls.ResourceDemandedString:GetSizeX() + 10);


DiploCorner.lua

UI/InGame/WorldView/DiploCorner.lua
0296
TruncateString( Controls.LengthTest, Controls.ChatPull:GetSizeX(), Locale.ConvertTextKey("TXT_KEY_DIPLO_TO_TEAM"));
0300
TruncateString( Controls.LengthTest, Controls.ChatPull:GetSizeX(), Locale.ConvertTextKey("TXT_KEY_DIPLO_TO_PLAYER", Players[ iPlayer ]:GetNickName()));
0356
TruncateString( textControl, Controls.ChatPull:GetSizeX()-20, Locale.ConvertTextKey("TXT_KEY_DIPLO_TO_PLAYER", pPlayer:GetNickName()));


DiploList.lua

UI/InGame/DiploList.lua
0213
local textBoxSize = Controls.NameBox:GetSizeX() - Controls.LeaderName:GetOffsetX();
0229
local textBoxSize = Controls.NameBox:GetSizeX() - Controls.CivName:GetOffsetX() - 120;
0260
local textBoxSize = controlTable.NameBox:GetSizeX() - controlTable.LeaderName:GetOffsetX();
0334
TruncateString( controlTable.DiploState, controlTable.StatusBox:GetSizeX(), statusString );


DiploRelationships.lua

UI/InGame/Popups/DiploRelationships.lua
0197
local textBoxSize = controlTable.LeaderNameStack:GetSizeX() - controlTable.DiploState:GetSizeX() -
0198
controlTable.Score:GetSizeX() - controlTable.CivIconBG:GetSizeX()- 74;


DiploVotePopup.lua

UI/InGame/Popups/DiploVotePopup.lua
0067
local textBoxSize = controlTable.Button:GetSizeX() - controlTable.ButtonText:GetOffsetX();


EnemyUnitPanel.lua

UI/InGame/WorldView/EnemyUnitPanel.lua
0553
local sizeX = Controls.DetailsGrid:GetSizeX();


GameMenu.lua

UI/InGame/Menus/GameMenu.lua
0320
local availableTextExtent = Controls.ScrollPanel:GetSizeX();


LoadMenu.lua

UI/FrontEnd/LoadMenu.lua
0231
TruncateString(Controls.SaveFileName, Controls.DetailsBox:GetSizeX(), name);
0558
TruncateString(controlTable.ButtonText, controlTable.Button:GetSizeX(), entryName);
0576
TruncateString(controlTable.ButtonText, controlTable.Button:GetSizeX(), displayName);


Lobby.lua

UI/FrontEnd/Multiplayer/Lobby.lua
0228
TruncateString(controlTable.ServerNameLabel, controlTable.ServerNameBox:GetSizeX(), serverEntry.serverName);


MPList.lua

UI/InGame/WorldView/MPList.lua
0126
local textSize = controlTable.Root:GetSizeX() - controlTable.Name:GetOffsetX() - controlTable.CivIconBG:GetSizeX() + (controlTable.IconBox:GetOffsetX() /2);
0245
teamEntry.Root:SetSizeX( teamEntry.TeamStack:GetSizeX() );


ReplayViewer.lua

UI/InGame/Popups/ReplayViewer.lua
0324
local xAbsoluteOffset = (screenX * 0.5) - (Controls.MainPanel:GetSizeX() * 0.5);
0332
local graphDisplayWidth = Controls.GraphDisplay:GetSizeX();


SaveMenu.lua

UI/InGame/Menus/SaveMenu.lua
0569
TruncateString(instance.ButtonText, instance.Button:GetSizeX(), displayName);


StagingRoom.lua

UI/FrontEnd/Multiplayer/StagingRoom.lua
0385
TruncateString(slotInstance.PlayerNameLabel, slotInstance.PlayerNameBox:GetSizeX() -
0559
TruncateString(Controls.PlayerNameLabel, Controls.PlayerNameBox:GetSizeX() -


SupportFunctions.lua

UI/SupportFunctions.lua
0016
local fullStrExtent = control:GetSizeX();
0023
local trailingExtent = control:GetSizeX();
0037
local ellipsisExtent = control:GetSizeX();
0043
truncatedSize = control:GetSizeX();


TradeLogic.lua

UI/InGame/WorldView/TradeLogic.lua
0985
TruncateString(Controls.ThemName, Controls.ThemTablePanel:GetSizeX() - Controls.ThemTablePanel:GetOffsetX(),
2784
TruncateString(controlTable.Name, controlTable.ButtonSize:GetSizeX() - controlTable.Name:GetOffsetX(), szName);


VictoryProgress.lua

UI/InGame/Popups/VictoryProgress.lua
0577
SetCivName(pPlayer, i, controlTable.Name, true, controlTable.Civ:GetSizeX() - controlTable.CivIconBG:GetSizeX());


VoteResultsPopup.lua

UI/InGame/Popups/VoteResultsPopup.lua
0155
unSize = controlTable.UNIcon:GetSizeX();
0168
TruncateString(controlTable.PlayerNameText, controlTable.PlayerNameBox:GetSizeX(), strName);
0176
TruncateString(controlTable.VoteCastText, controlTable.VoteCastBox:GetSizeX() - unSize, strVote);


VoteResultsPopup.lua (G&K)

DLC/Expansion/UI/InGame/Popups/VoteResultsPopup.lua
0199
TruncateString(controlTable.VoteCastText, controlTable.VoteCastBox:GetSizeX(), strVote);



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.