draw/SimpleTextOutlined

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Added links to text align enums)
Line 15: Line 15:
 
|name=font
 
|name=font
 
|desc=The font name to draw with. See {{LibraryFunction|surface|CreateFont}} to create your own, or [[Default_Fonts|here]] for a list of default fonts.
 
|desc=The font name to draw with. See {{LibraryFunction|surface|CreateFont}} to create your own, or [[Default_Fonts|here]] for a list of default fonts.
 +
|default="DermaDefault"
 
}}
 
}}
 
{{Arg
 
{{Arg
Line 20: Line 21:
 
|name=x
 
|name=x
 
|desc=The X Coordinate.
 
|desc=The X Coordinate.
 +
|default=0
 
}}
 
}}
 
{{Arg
 
{{Arg
Line 25: Line 27:
 
|name=y
 
|name=y
 
|desc=The Y Coordinate.
 
|desc=The Y Coordinate.
 +
|default=0
 
}}
 
}}
 
{{Arg
 
{{Arg
Line 30: Line 33:
 
|name=color
 
|name=color
 
|desc=The color of the text. Uses the {{Struct|Color}}.
 
|desc=The color of the text. Uses the {{Struct|Color}}.
 +
|default=Color( 255, 255, 255, 255 )
 
}}
 
}}
 
{{Arg
 
{{Arg
Line 35: Line 39:
 
|name=xAlign
 
|name=xAlign
 
|desc=The alignment of the X Coordinate using {{Enum|TEXT_ALIGN}}.
 
|desc=The alignment of the X Coordinate using {{Enum|TEXT_ALIGN}}.
 +
|default=TEXT_ALIGN_LEFT
 
}}
 
}}
 
{{Arg
 
{{Arg
Line 40: Line 45:
 
|name=yAlign
 
|name=yAlign
 
|desc=The alignment of the Y Coordinate using {{Enum|TEXT_ALIGN}}.
 
|desc=The alignment of the Y Coordinate using {{Enum|TEXT_ALIGN}}.
 +
|default=TEXT_ALIGN_TOP
 
}}
 
}}
 
{{Arg
 
{{Arg
Line 50: Line 56:
 
|name=outlinecolor
 
|name=outlinecolor
 
|desc=Color of the outline. Uses the {{Struct|Color}}.
 
|desc=Color of the outline. Uses the {{Struct|Color}}.
 +
|default=Color( 255, 255, 255, 255 )
 
}}
 
}}
 
{{Ret
 
{{Ret

Revision as of 08:03, 6 July 2016

 draw.SimpleTextOutlined( )

Contents

Description

Creates a simple line of text that is outlined.

Arguments

string Text

The text to draw.

Arguments

string font="DermaDefault"

The font name to draw with. See surface.CreateFont to create your own, or here for a list of default fonts.

Arguments

number x=0

The X Coordinate.

Arguments

number y=0

The Y Coordinate.

Arguments

table color=Color( 255, 255, 255, 255 )

The color of the text. Uses the Color structure.

Arguments

number xAlign=TEXT_ALIGN_LEFT

The alignment of the X Coordinate using TEXT_ALIGN_ Enums.

Arguments

number yAlign=TEXT_ALIGN_TOP

The alignment of the Y Coordinate using TEXT_ALIGN_ Enums.

Arguments

number outlinewidth

Width of the outline.

Arguments

table outlinecolor=Color( 255, 255, 255, 255 )

Color of the outline. Uses the Color structure.

Returns

number

The width of the text. Same value as if you were calling surface.GetTextSize.

Returns

number

The height of the text. Same value as if you were calling surface.GetTextSize.
Personal tools
Navigation