mirror of
https://github.com/parnic/LibDogTag-3.0.git
synced 2025-06-16 20:20:14 -05:00
Added a Monochrome outline tag
FontString outline is now only changed if something changed (performance increase)
This commit is contained in:
@ -67,6 +67,16 @@ DogTag:AddTag("Base", "Alpha", {
|
||||
category = L["Miscellaneous"]
|
||||
})
|
||||
|
||||
DogTag:AddTag("Base", "Monochrome", {
|
||||
code = function(number)
|
||||
DogTag.outline = "MONOCHROME"
|
||||
end,
|
||||
ret = "nil",
|
||||
doc = L["Set the FontString to be monochrome"],
|
||||
example = '[Monochrome "Hello"] => "Monochrome"',
|
||||
category = L["Miscellaneous"]
|
||||
})
|
||||
|
||||
DogTag:AddTag("Base", "Outline", {
|
||||
code = function(number)
|
||||
DogTag.outline = "OUTLINE"
|
||||
|
@ -300,8 +300,10 @@ local function updateFontString(fs)
|
||||
if opacity then
|
||||
fs:SetAlpha(opacity)
|
||||
end
|
||||
local a, b = fs:GetFont()
|
||||
fs:SetFont(a, b, outline or '')
|
||||
local a, b, c = fs:GetFont()
|
||||
if c ~= (outline or '') then
|
||||
fs:SetFont(a, b, outline or '')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user