I have tried also to change the function in this way (taken by Phanx addon):
Lua Code:
local function SetFont(obj, font, size, style, r, g, b, sr, sg, sb, sox, soy)
if not obj then return end -- TODO: prune things that don't exist anymore
obj:SetFont(font, size, style)
if sr and sg and sb then
obj:SetShadowColor(sr, sg, sb)
end
if sox and soy then
obj:SetShadowOffset(sox, soy)
end
if r and g and b then
obj:SetTextColor(r, g, b)
elseif r then
obj:SetAlpha(r)
end
end
But I got:
Lua Code:
10x gmFonts\core.lua:41: attempt to call method 'SetFont' (a nil value)
[string "@gmFonts\core.lua"]:41: in function <gmFonts\core.lua:39>
[string "@gmFonts\core.lua"]:69: in function <gmFonts\core.lua:55>
[string "@gmFonts\core.lua"]:100: in function <gmFonts\core.lua:87>
Locals:
obj = "AchievementFont_Small"
font = "Addons\gmFonts\fonts\Candarab.ttf"
size = 12
style = nil
r = nil
g = nil
b = nil
sr = 0
sg = 0
sb = 0
sox = 1
soy = -1
(*temporary) = nil
(*temporary) = "AchievementFont_Small"
(*temporary) = "Addons\gmFonts\fonts\Candarab.ttf"
(*temporary) = 12
(*temporary) = nil
(*temporary) = "attempt to call method 'SetFont' (a nil value)"
Thanks again.