Mercurial > wow > hansgar_and_franzok_assist
diff Libs/DF/fw.lua @ 25:6bb668a41455
- framework update.
| author | Tercio |
|---|---|
| date | Thu, 08 Oct 2015 11:52:43 -0300 |
| parents | 7a285d98b95f |
| children | e16b1fc13935 |
line wrap: on
line diff
--- a/Libs/DF/fw.lua Mon Sep 14 17:10:38 2015 -0300 +++ b/Libs/DF/fw.lua Thu Oct 08 11:52:43 2015 -0300 @@ -1,5 +1,6 @@ -local major, minor = "DetailsFramework-1.0", 9 +local dversion = 10 +local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary (major, minor) if (not DF) then @@ -8,6 +9,7 @@ end DetailsFrameworkCanLoad = true +local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0") local _type = type local _unpack = unpack @@ -23,6 +25,11 @@ DF.SliderCounter = 1 DF.SplitBarCounter = 1 +DF.FrameWorkVersion = tostring (dversion) +function DF:PrintVersion() + print ("Details! Framework Version:", DF.FrameWorkVersion) +end + LibStub:GetLibrary("AceTimer-3.0"):Embed (DF) do @@ -188,6 +195,11 @@ fontString:SetFont (fonte, max (...), flags) end function DF:SetFontFace (fontString, fontface) + local font = SharedMedia:Fetch ("font", fontface, true) + if (font) then + fontface = font + end + local _, size, flags = fontString:GetFont() fontString:SetFont (fontface, size, flags) end @@ -540,7 +552,11 @@ local tn = tonumber function DF:ParseColors (_arg1, _arg2, _arg3, _arg4) if (_type (_arg1) == "table") then - _arg1, _arg2, _arg3, _arg4 = _unpack (_arg1) + if (not _arg1[1] and _arg1.r) then + _arg1, _arg2, _arg3, _arg4 = _arg1.r, _arg1.g, _arg1.b, _arg1.a + else + _arg1, _arg2, _arg3, _arg4 = _unpack (_arg1) + end elseif (_type (_arg1) == "string") then
