Structures/TextData

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
 
{{Structure
 
{{Structure
| Description = Used for {{LibraryFunction|draw|Text}}.
+
|Description=Used for {{LibraryFunction|draw|Text}}.
| Fields =
+
|Fields=
 
{{StructureField|string|text|Text to be drawn.}}
 
{{StructureField|string|text|Text to be drawn.}}
{{StructureField|string|font|The font to draw with.}}
+
{{StructureField|string|font|The font to draw with. List of fonts can be found [[Talk:Libraries/surface/SetFont|here]].
{{StructureField|number|x|The X Coordinate.}}
+
'''Default:''' DermaDefault}}
{{StructureField|number|y|The Y Coordinate.}}
+
{{StructureField|number|x|The X coordinate.}}
{{StructureField|number|xalign|The Alignment of the X position.}}
+
{{StructureField|number|y|The Y coordinate.}}
{{StructureField|number|yalign|The Alignment of the Y position.}}
+
{{StructureField|number|xalign|The alignment of the X position. See {{EnumLink|TEXT}}
{{StructureField|Color|color|The text color}}
+
'''Default:''' TEXT_ALIGN_LEFT}}
 +
{{StructureField|number|yalign|The alignment of the Y position. See {{EnumLink|TEXT}}
 +
'''Default:''' TEXT_ALIGN_TOP}}
 +
{{StructureField|Color|color|The text color
 +
'''Default:''' color_white}}
 
}}
 
}}
 
== Additional Notes ==
 
* Default font is DermaDefault.
 
* Default text color is Color(255,255,255,255).
 
* Default xAlign is TEXT_ALIGN_LEFT
 
* Default yAlign is TEXT_ALIGN_TOP
 
* Any other fields default to 0.
 
* For a list of fonts that still work with the update look [[Talk:Libraries/surface/SetFont|here]].
 
* xalign and yalign must be [[Enums/TEXT|TEXT_ALIGN_*]] enums.
 
 
[[Category:Structures]]
 

Revision as of 17:34, 31 August 2013

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

number x

The X coordinate.

number y

The Y coordinate.

number xalign

The alignment of the X position. See Template:EnumLink Default: TEXT_ALIGN_LEFT

number yalign

The alignment of the Y position. See Template:EnumLink Default: TEXT_ALIGN_TOP

Color color

The text color Default: color_white

Personal tools
Navigation