draw.Text

From Garry's Mod
Jump to: navigation, search
 draw.Text( )

Contents

Description

Works like draw.SimpleText but uses a table structure instead.

NOTE

This is a rendering function that requires a 2D rendering context.
This means that it will only work in hooks with a 2D rendering context.

Arguments

table textdata

The text properties. See the TextData structure

Returns

number

Width of drawn text

Returns

number

Height of drawn text

Examples

Example

Example usage

hook.Add( "HUDPaint", "drawTextExample", function()
	draw.Text( {
		text = "test",
		pos = { 50, 50 }
	} )
end )


Personal tools
Navigation