Common UI Properties (Civ5)

From Civilization Modding Wiki
Revision as of 14:31, 19 September 2012 by DonQuich (talk | contribs) (Created page with "''This page is a part of the Lua and UI Reference (Civ5).'' = ButtonBase = == Voids == <h4>Void1</h4> :Format: any integer. :Usage: This value is passed to the registered ca...")
(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).

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 or 1.
Usage:

Pause

Format: any positive floating point.
Usage:

EndPause

Format: any positive floating point.
Usage:

Cycle

Format: Once or Bounce.
Usage:

Speed and acceleration

Speed

Format: any positive floating point..
Usage:

Function

Format: Root or Square.
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, or TwCenMT24.
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 are Beige_Black_Alpha or Beige_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 or 1.
Usage:

ForceNonIME

Format: 0 or 1.
Usage:

ControlBase

Core properties

ID

Format: any string.
Usage:

Disabled

Format: 0 or 1.
Usage:

Appearance

Hidden

Format: 0 or 1.
Usage:

Style

Format: the name of a style defined in Assets/UI/Styles.xml.
Usage:

NoClip

Format: 0 or 1.
Usage:

Color

Format: either R,G,B,A or Color, A. Examples: 255,0,0,128 or Red,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.
Usage:

BranchAlpha

Format: any positive floating point.
Usage:

Layout

Different anchoring combinations for a child within its parent container. Size and offset are constant for all positions.

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 or R.
  • Y may be Top, Center, Bottom, T, C or B.
  • The character case does not matter.
Usage:

AnchorSide

Format: X,Y where X and Y are either i or o. 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 or 1.
Usage:

ConsumeMouse

Format: 0 or 1.
Usage:

ConsumeMouseOver

Format: 0 or 1.
Usage:

ConsumeMouseWheel

Format: 0 or 1.
Usage:

ConsumeMouseButton

Format: 0 or 1.
Usage:

Tool tips

ToolTip

Format: any string.
Usage:

ToolTipType

Format: any string, the name of a previously defined ToolTipType.
Usage: