Structures/TextData

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Important update; using x and y doesn't work when using TextShadow)
Line 4: Line 4:
 
{{StructureField|string|text|Text to be drawn.}}
 
{{StructureField|string|text|Text to be drawn.}}
 
{{StructureField|string|font|The font to draw with. List of fonts can be found [[Talk:Libraries/surface/SetFont|here]].|"DermaDefault"}}
 
{{StructureField|string|font|The font to draw with. List of fonts can be found [[Talk:Libraries/surface/SetFont|here]].|"DermaDefault"}}
 +
{{StructureField|Table|pos|This holds the X and Y coordinates. Key value 1 is x, key value 2 is y.}}
 
{{StructureField|number|x|The X coordinate.}}
 
{{StructureField|number|x|The X coordinate.}}
 
{{StructureField|number|y|The Y coordinate.}}
 
{{StructureField|number|y|The Y coordinate.}}

Revision as of 17:54, 26 January 2014

Used for draw.Text.



Type Name Description
string text

Text to be drawn.

string font

The font to draw with. List of fonts can be found here.

Default: "DermaDefault"

Table pos

This holds the X and Y coordinates. Key value 1 is x, key value 2 is y.

number x

The X coordinate.

number y

The Y coordinate.

number xalign

The alignment of the X position. See TEXT_ Enums

Default: TEXT_ALIGN_LEFT

number yalign

The alignment of the Y position. See TEXT_ Enums

Default: TEXT_ALIGN_TOP

number color

The text color

Default: color_white

Personal tools
Navigation