DualText
Draws two lines of text in a panel. Automatically calculates spacing and aligns it for you.
Arguments
String toptext
First string
(Optional) String topfont
Font of the first string
(Optional) Color topcol
Color of the first string
String bottomtext
Second string
(Optional) String bottomfont
Font of the second string
(Optional) Color bottomcol
Color of the second string
(Optional) Number alignment
Horizontal alignment of the text, uses TEXT_ALIGN
enums
(Optional) number centerSpacing
Pixel offset, is applied to both texts to push them together if they are far apart
Example
local pnl = vgui.Create("DPanel")
pnl:ClearPaint()
:Background(Color(80, 80, 80, 255))
:DualText(
"Party Name",
"SomeBigFont",
Color(255, 255, 255, 255),
"3 members",
"SomeSmallerFont",
Color(200, 200, 200, 200)
)