TextButton (Civ5 Type)
This page is a part of the Lua and UI Reference (Civ5).
New Properties
ButtonDown
- Format: Unknown.
- Usage: Unknown.
ColorLayer0
- Format: Unknown.
- Usage: Unknown.
MouseOver
- Format: Unknown.
- Usage: Unknown.
MouseOverStyle
- Format: Unknown.
- Usage: Unknown.
NormalState
- Format: Unknown.
- Usage: Unknown.
New Instance Methods
Methods are functions that belong to an object. Instance methods are invoked through a colon, as in caller:SomeMethod(<args>)
, where caller is an instance of TextButton.
A colon implictly passes the caller object as the first argument. That is, the former call is equivalent to this one: caller.SomeMethod(caller, <args>)
|
LocalizeAndSetText(string name, int searchString = nil, string minFaithForProphet = nil, unknown arg3, unknown arg4, unknown arg5, unknown arg6, unknown arg7, unknown arg8, string arg9, unknown arg10, unknown arg11)
| ||||
|
RegisterCallback(MouseType OnSearchTextEnter, (void func(PolicyBranchType policyBranchIndex, UnitType y, Button button)) OnClose = nil)
| ||||
|
SetText(string localizedString)
| ||||
|
SetVoid1(OrderType MAINTAIN_GOLD)
|
Inherited from ButtonBase
|
ClearCallback(MouseType arg0)
| ||||
|
IsTrackingMiddleMouseButton
| ||||
|
IsTrackingRightMouseButton
| ||||
|
SetVoid2(ProcessType process)
| ||||
|
SetVoids(ResourceType building, ResourceType addToList)
| ||||
ActionType
|
GetVoid1()
| ||||
ResourceType
|
GetVoid2()
| ||||
bool
|
IsTrackingLeftMouseButton()
| ||||
|
RegisterCallback(MouseType OnSearchTextEnter, (void func(PolicyBranchType policyBranchIndex, UnitType y, Button button)) OnClose = nil)
| ||||
|
SetVoid1(OrderType MAINTAIN_GOLD)
|
Inherited from TextBase
XML Properties: StringFontFontStyleWrapWidthTruncateWidthReduceOnTruncateLeadingOffsetColorSetColor0Color1Color2Color3ForceIMEForceNonIME
string
|
GetText()
| ||||
|
SetFontByName(string arg0)
| ||||
|
SetForceIME
| ||||
|
SetForceNonIME
| ||||
|
SetString(unknown arg0)
| ||||
|
SetTruncateWidth(int width)
| ||||
|
SetWrapWidth(PlayerID arg0)
| ||||
|
LocalizeAndSetText(string name, int searchString = nil, string minFaithForProphet = nil, unknown arg3, unknown arg4, unknown arg5, unknown arg6, unknown arg7, unknown arg8, string arg9, unknown arg10, unknown arg11)
| ||||
|
SetText(string localizedString)
|
Inherited from ControlBase
XML Properties: none.
|
BuildEntry(string arg0, table arg1)
| ||||
|
CalculateInternals()
| ||||
|
CalculateInternalSize()
| ||||
|
CalculateSize()
| ||||
|
ClearEntries()
| ||||
Button
|
GetButton()
| ||||
|
RegisterCheckHandler((void func(bool bIsChecked)) OnPolicyInfo)
| ||||
|
RegisterSelectionCallback((void func(FaithPurchaseType v1, int v2)) OnChatTarget)
| ||||
|
SetCheck(bool cityBanners)
| ||||
|
SetPercent(int percentDone)
| ||||
|
SetPercents(float productionProgressPercent, float productionProgressPlusThisTurnPercent)
| ||||
|
SetScrollValue(int arg0)
| ||||
|
SetTexture(string textureName)
| ||||
|
SetTextureOffsetVal(int arg0, int offset)
| ||||
|
UnloadTexture()
| ||||
|
SetVoid2(ProcessType process)
| ||||
|
SetVoids(ResourceType building, ResourceType addToList)
| ||||
string
|
GetText()
| ||||
|
LocalizeAndSetText(string name, int searchString = nil, string minFaithForProphet = nil, unknown arg3, unknown arg4, unknown arg5, unknown arg6, unknown arg7, unknown arg8, string arg9, unknown arg10, unknown arg11)
| ||||
|
RegisterCallback(MouseType OnSearchTextEnter, (void func(PolicyBranchType policyBranchIndex, UnitType y, Button button)) OnClose = nil)
| ||||
|
SetText(string localizedString)
| ||||
|
SetVoid1(OrderType MAINTAIN_GOLD)
|
Common
|
ChangeParent(Image parent)
| ||||
|
DestroyAllChildren()
| ||||
string
|
GetID()
| ||||
|
GetNumChildren
| ||||
|
IsDisabled
| ||||
|
ReleaseChild(WorldAnchor arg0)
| ||||
|
SetDisabled(bool disableBanners)
| ||||
|
SortChildren((void func(unknown a, unknown b)) SortFunction)
|
Layout
XML Properties: SizeOffsetAnchorAnchorSide
unknown, int
|
GetOffsetVal()
| ||||
int
|
GetOffsetX()
| ||||
int
|
GetOffsetY()
| ||||
Vector2
|
GetSize()
| ||||
int, int
|
GetSizeVal()
| ||||
int
|
GetSizeX()
| ||||
int
|
GetSizeY()
| ||||
|
ReprocessAnchoring()
| ||||
|
SetAnchor(string arg0)
| ||||
|
SetOffset(Vector2 offset)
| ||||
|
SetOffsetVal(int xOffset, int yOffset)
| ||||
|
SetOffsetX(int xOffset)
| ||||
|
SetOffsetY(int TOP_COMPENSATION)
| ||||
|
SetSize(table blockSize)
| ||||
|
SetSizeVal(int baseWidth, int newHeight)
| ||||
|
SetSizeX(int width)
| ||||
|
SetSizeY(int newSizeY)
|
Appearance
XML Properties: HiddenStyleNoClipColorBranchAlpha
|
BranchResetAnimation()
| ||||
|
CalculateVisibilityBox
| ||||
int
|
IsHidden()
| ||||
|
SetAlpha(float DimAlpha)
| ||||
|
SetColor(table fadeColor, int arg1)
| ||||
|
SetColorByName(string colorSet)
| ||||
|
SetColorChannel(int arg0, float arg1)
| ||||
|
SetColorVal(int arg0, int arg1 = nil, int arg2 = nil, int arg3 = nil)
| ||||
|
SetHide(int disablePolicies)
| ||||
|
SetNoClip
|
Interaction
XML Properties: NeedsMouseOverConsumeMouseConsumeMouseOverConsumeMouseWheelConsumeMouseButton
|
GetConsumeMouseButton
| ||||
|
GetConsumeMouseOver
| ||||
|
GetConsumeMouseWheel
| ||||
bool
|
HasMouseOver()
| ||||
|
SetConsumeMouseButton
| ||||
|
SetConsumeMouseOver(bool arg0)
| ||||
|
SetConsumeMouseWheel
|
Tool Tip
XML Properties: ToolTipToolTipType
|
EnableToolTip(bool arg0)
| ||||
|
GetToolTipString
| ||||
|
IsToolTipEnabled
| ||||
|
LocalizeAndSetToolTip(string description, string minFaithForProphet = nil, string threshold, string moodText, string spyRank, string spyName, string spyRank, string spyName, unknown arg8, unknown arg9, string arg10, unknown arg11, unknown arg12)
| ||||
|
SetToolTipCallback((void func(Slider control)) TipHandler)
| ||||
|
SetToolTipString(string foodToolTip)
| ||||
|
SetToolTipType(string arg0)
|
Source code samples
Too many occurences. Only 10 out of 144 are listed.
CityList.xml (G&K)
DLC/Expansion/UI/InGame/CityList.xml
0100
|
<TextButton Offset="0,22" Anchor="C,B" Font="TwCenMT14" ColorSet="Beige_Black_Alpha" String="TXT_KEY_CLOSE" ToolTip="TXT_KEY_CLOSE" FontStyle="Shadow" MouseOverStyle="SoftShadow" ConsumeMouse="1" ID="CloseButton" Hidden="0" /> |
DiploList.xml (G&K)
DLC/Expansion/UI/InGame/DiploList.xml
0137
|
<TextButton Anchor="R,B" AnchorSide="o,i" Offset="7,0" Font="TwCenMT22" String="[ICON_INFLUENCE]" ID="QuestIcon"/> |
EspionageOverview.xml (G&K)
DLC/Expansion/UI/InGame/Popups/EspionageOverview.xml
0252
|
<TextButton Offset="20,0" Anchor="L,B" Font="TwCenMT20" ColorSet="Beige_Black_Alpha" String="TXT_KEY_EO_NAME_RANK" FontStyle="Shadow" MouseOverStyle="SoftShadow" ConsumeMouse="1" ID="ASortByNameRank"> |
0337
|
<TextButton Offset="0,0" Anchor="C,B" Font="TwCenMT20" ColorSet="Beige_Black_Alpha" ToolTip="TXT_KEY_EO_CIVILIZATION_SORT_TT" String="TXT_KEY_EO_CIVILIZATION" FontStyle="Shadow" MouseOverStyle="SoftShadow" ConsumeMouse="1" ID="YCSortByCivilization"> |
0420
|
<TextButton Offset="0,0" Anchor="C,B" Font="TwCenMT20" ColorSet="Beige_Black_Alpha" String="TXT_KEY_EO_INTRIGUE_FROM" FontStyle="Shadow" MouseOverStyle="SoftShadow" ConsumeMouse="1" ID="IntrigueSortByFrom"> |
GameMenu.xml
UI/InGame/Menus/GameMenu.xml
0174
|
<TextButton ID="ModsButton" Offset="6,0" Anchor="L,B" Font="TwCenMT14" ColorSet="Beige_Black_Alpha" String="Mods" FontStyle="Shadow" MouseOverStyle="SoftShadow" ConsumeMouse="1" /> |
ReligionOverview.xml (G&K)
DLC/Expansion/UI/InGame/Popups/ReligionOverview.xml
0269
|
<TextButton Offset="0,1" Anchor="C,C" Font="TwCenMT16" ColorSet="Beige_Black_Alpha" String="TXT_KEY_RO_B_TYPE" FontStyle="Shadow" MouseOverStyle="SoftShadow" ConsumeMouse="1" ID="BPSortbyType" Hidden="0" > |
TopPanel.xml
UI/InGame/TopPanel.xml
0016
|
<TextButton Anchor="C,T" String="CULTURE!" ColorLayer0="255,255,200,255" ID="CultureString" ToolTipType="TooltipTypeTopPanel"/> |
0028
|
<TextButton Anchor="C,C" String="TXT_KEY_HELP_CAPS" Font="TwCenMT20" NormalState="Beige_Black" MouseOver="White_Black" ButtonDown="Beige_Black_Alpha" ID="CivilopediaButton" ToolTip="TXT_KEY_CIVILOPEDIA_TOOLTIP" /> |
UnitPanel.xml
UI/InGame/WorldView/UnitPanel.xml
0099
|
<TextButton Anchor="R,C" String="000" ID="UnitStatStrength" Offset="10,-2" ToolTip="TXT_KEY_UPANEL_STRENGTH_TT" /> |
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.