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

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


Usage

int UIElement:GetOffsetX()


Returned Value

No description available.


Source code samples

Redundant occurences have been removed.

CityView.lua

UI/InGame/CityView/CityView.lua
0721
local cityNameSize = (math.abs(Controls.NextCityButton:GetOffsetX()) * 2) - (Controls.PrevCityButton:GetSizeX());


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();


DiploVotePopup.lua

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


MPList.lua

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


ReplayViewer.lua

UI/InGame/Popups/ReplayViewer.lua
0325
xAbsoluteOffset = xAbsoluteOffset + Controls.GraphsPanel:GetOffsetX() + Controls.GraphDisplay:GetOffsetX();


StagingRoom.lua

UI/FrontEnd/Multiplayer/StagingRoom.lua
0386
slotInstance.PlayerNameLabel:GetOffsetX(), playerName);
0404
slotInstance.PlayerNameLabel:GetOffsetX(), Locale.ConvertTextKey("TXT_KEY_AI_NICKNAME"));
0560
Controls.PlayerNameLabel:GetOffsetX(), playerName);


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);



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.