mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-29 18:56:02 +00:00
api: add and use rgbhex function
* A memoizing method to cache and return hex colorstrings from rgb input. * Refactor all occurences of adhoc rgb to hex string concatenation to use the new method * Refactor chat module to use it
This commit is contained in:
+2
-2
@@ -1412,7 +1412,7 @@ function pfUI.uf:RefreshUnit(unit, component)
|
||||
pfUI.uf:AddIcon(unit, pos, icon)
|
||||
end
|
||||
|
||||
-- hide unued icon slots
|
||||
-- hide unused icon slots
|
||||
for pos=table.getn(active)+1, 6 do
|
||||
pfUI.uf:HideIcon(unit, pos)
|
||||
end
|
||||
@@ -2062,5 +2062,5 @@ function pfUI.uf.GetColor(self, preset)
|
||||
g = ( g + .75 ) * .5
|
||||
b = ( b + .75 ) * .5
|
||||
|
||||
return "|cff" .. string.format("%02x%02x%02x", r*255, g*255, b*255)
|
||||
return rgbhex(r,g,b)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user