Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 1.01 KB

File metadata and controls

28 lines (17 loc) · 1.01 KB

MultiColorText

Example:

hook.Add("HUDPaint", "HUDPaint_MultiColorText_Example", function()
  draw.MultiColorText("Default", ScrW()/2, ScrH()/2, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, Color(255, 0, 0), "This text ", Color(0, 255, 0), "has multiple ", Color(0, 0, 255), "different colors")
end)

API Context:

Font: A font created with surface.CreateFont.

x: The X coordinate on the screen.

y: The Y coordinate on the screen.

xAlign: The alignment of the X coordinate using Enums/TEXT_ALIGN.

yAlign: The alignment of the Y coordinate using Enums/TEXT_ALIGN.

vararg: A vararg of colors and strings. Any non string value will be converted to a string with tostring().

draw.MultiColorText(Font, x, y, xAlign, yAlign, vararg)