Skip to content

SuperSoupr/MultiColorText

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

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)

About

Allows to draw text with multiple colors with just one function in Garry's Mod

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages