Garry's Mod Wiki

draw.WordBox

number, number draw.WordBox( number bordersize, number x, number y, string text, string font, table boxcolor, table textcolor )

Description

Draws a rounded box with text in it.

This is a rendering function that requires a 2d rendering context.

This means that it will only work in 2d Rendering Hooks.

Arguments

1 number bordersize
Size of border, should be multiple of 2. Ideally this will be 8 or 16.
2 number x
The X Coordinate.
3 number y
The Y Coordinate.
4 string text
Text to draw.
5 string font
Font to draw in. See surface.CreateFont to create your own, or here for a list of default fonts.
6 table boxcolor
The box color. Uses the Color.
7 table textcolor
The text color. Uses the Color.

Returns

1 number
The width of the word box.
2 number
The height of the word box.

Page Links


Special Pages


Wikis

?

Render Time: 52ms

DB GetPage 2
Generate Html 26
SaveChanges (1) 9
Render Body 0
Render Sidebar 11