draw.WordBox

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

Contents

Description

Draws a rounded box with text in it.

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

number bordersize

Size of border, should be multiple of 2. Ideally this will be 8 or 16.

Arguments

number x

The X Coordinate.

Arguments

number y

The Y Coordinate.

Arguments

string text

Text to draw.

Arguments

string font

Font to draw in. See surface.CreateFont to create your own, or here for a list of default fonts.

Arguments

table boxcolor

The box color. Uses the Color structure.

Arguments

table textcolor

The text color. Uses the Color structure.

Returns

number

The width of the word box.

Returns

number

The height of the word box.
Personal tools
Navigation