from retail
This commit is contained in:
@@ -6,7 +6,6 @@ local L = WeakAuras.L;
|
||||
local defaultFont = WeakAuras.defaultFont
|
||||
local defaultFontSize = WeakAuras.defaultFontSize
|
||||
|
||||
|
||||
local default = {
|
||||
displayText = "%p",
|
||||
outline = "OUTLINE",
|
||||
@@ -76,8 +75,6 @@ local function modify(parent, region, data)
|
||||
local text = region.text;
|
||||
|
||||
region.useAuto = WeakAuras.CanHaveAuto(data);
|
||||
region.progressPrecision = data.progressPrecision;
|
||||
region.totalPrecision = data.totalPrecision;
|
||||
|
||||
local fontPath = SharedMedia:Fetch("font", data.font);
|
||||
text:SetFont(fontPath, data.fontSize, data.outline);
|
||||
@@ -161,9 +158,17 @@ local function modify(parent, region, data)
|
||||
|
||||
local UpdateText
|
||||
if WeakAuras.ContainsAnyPlaceHolders(data.displayText) then
|
||||
local getter = function(key, default)
|
||||
local fullKey = "displayText_format_" .. key
|
||||
if (data[fullKey] == nil) then
|
||||
data[fullKey] = default
|
||||
end
|
||||
return data[fullKey]
|
||||
end
|
||||
local formatters = WeakAuras.CreateFormatters(data.displayText, getter)
|
||||
UpdateText = function()
|
||||
local textStr = data.displayText;
|
||||
textStr = WeakAuras.ReplacePlaceHolders(textStr, region, nil);
|
||||
textStr = WeakAuras.ReplacePlaceHolders(textStr, region, nil, false, formatters);
|
||||
if (textStr == nil or textStr == "") then
|
||||
textStr = " ";
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user