Common UI Properties (Civ5)
From Civilization Modding Wiki
Jump to navigationJump to search
This page is a part of the Lua and UI Reference (Civ5).
ButtonBase
Voids
Void1
- Format: any integer.
- Usage: This value is passed to the registered callbacks for user inputs (such as a click) and can be used in Lua to associate a control with the corresponding data.
Void2
- Same as #Void1.
AnimBase
Animation behavior
Stopped
- Format:
0
or1
. - Usage:
Pause
- Format: any positive floating point.
- Usage:
EndPause
- Format: any positive floating point.
- Usage:
Cycle
- Format:
Once
orBounce
. - Usage:
Speed and acceleration
Speed
- Format: any positive floating point..
- Usage:
Function
- Format:
Root
orSquare
. - Usage:
FunctionPower
- Format: any positive floating point.
- Usage:
TextBase
Text and font
String
- Format: any string. May be a text key.
- Usage: The text to be displayed.
Font
- Format:
TwCenMT14
,TwCenMT16
,TwCenMT18
,TwCenMT20
,TwCenMT22
, orTwCenMT24
. - Usage: The font name and size used to render the text.
FontStyle
- Format:
Base
,Shadow
,SoftShadow
,Stroke
or an empty string. - Usage: The style to apply to the text.
Font color
ColorSet
- Format: any of the color sets defined in
Assets/UI/ColorAtlas.xml
. Typical values areBeige_Black_Alpha
orBeige_Black
. - Usage:
Color0
- Format: see #Color
- Usage:
Color1
- Format: see #Color.
- Usage:
Color2
- Format: see #Color.
- Usage:
Color3
- Format: see #Color.
- Usage:
Text layout
WrapWidth
- Format: any integer.
- Usage:
TruncateWidth
- Format: any integer.
- Usage:
ReduceOnTruncate
- Format: any integer.
- Usage:
LeadingOffset
- Format: any integer.
- Usage:
Input method editor
ForceIME
- Format:
0
or1
. - Usage:
ForceNonIME
- Format:
0
or1
. - Usage:
ControlBase
Core properties
ID
- Format: any string.
- Usage:
Disabled
- Format:
0
or1
. - Usage:
Appearance
Hidden
- Format:
0
or1
. - Usage:
Style
- Format: the name of a style defined in
Assets/UI/Styles.xml
. - Usage:
NoClip
- Format:
0
or1
. - Usage:
Color
- Format: either
R,G,B,A
orColor, A
. Examples:255,0,0,128
orRed,128
.- Color is one of the color names defined in
Assets/UI/ColorAtlas.xml
or in the Colors table. - R, G, B and A are integer values between 0 and 255. The alpha parameter is optional.
- Separators may be dots or commas.
- Color is one of the color names defined in
- Usage:
BranchAlpha
- Format: any positive floating point.
- Usage:
Layout
Size
- Format:
X,Y
where X and Y are positive integers. The separator may be a dot or a comma. - Usage:
Offset
- Format:
X,Y
where X and Y are positive integers. The separator may be a dot or a comma. - Usage:
Anchor
- Format:
X,Y
. The separator may be a dot or a comma.- X may be
Left
,Center
,Right
,L
,C
orR
. - Y may be
Top
,Center
,Bottom
,T
,C
orB
. - The character case does not matter.
- X may be
- Usage:
AnchorSide
- Format:
X,Y
where X and Y are eitheri
oro
. The separator may be a dot or a comma.- The possible values stand for "inner" and "outer".
- The character case does not matter.
- Usage:
Interaction
NeedsMouseOver
- Format:
0
or1
. - Usage:
ConsumeMouse
- Format:
0
or1
. - Usage:
ConsumeMouseOver
- Format:
0
or1
. - Usage:
ConsumeMouseWheel
- Format:
0
or1
. - Usage:
ConsumeMouseButton
- Format:
0
or1
. - Usage:
Tool tips
ToolTip
- Format: any string.
- Usage:
ToolTipType
- Format: any string, the name of a previously defined ToolTipType.
- Usage: