Originally Posted by Bruners
well its not that much now is it?
Code:
local _, player = UnitClass("player")
local colors = RAID_CLASS_COLORS
local r, g, b = colors[player].r*255, colors[player].g*255, colors[player].b*255
local string = "%d |cff%02x%02x%02xfps|r ||| %d |cff%02x%02x%02xms|r"
local fps = GetFramerate()
local ms = select(3, GetNetStats())
text:SetText(string.format(string, fps, r, g, b, ms, r, g, b))
And he can easily expand it or use the same variables elsewhere
|
Even though it technically would work, you're replacing the global string table with a local string value. It still works because the string library is set as the string's metatable.
There's also a new method that can be used,
fontstring:SetFormattedText(formatstring,
arg1,
...)