from retail
This commit is contained in:
@@ -28,6 +28,7 @@ local default = {
|
||||
yOffset = 0,
|
||||
radius = 200,
|
||||
rotation = 0,
|
||||
stepAngle = 15,
|
||||
fullCircle = true,
|
||||
arcLength = 360,
|
||||
constantFactor = "RADIUS",
|
||||
@@ -719,6 +720,7 @@ local growers = {
|
||||
local constantFactor = data.constantFactor
|
||||
local space = data.space or 0
|
||||
local radius = data.radius or 0
|
||||
local stepAngle = (data.stepAngle or 0) * math.pi / 180
|
||||
local limit = data.useLimit and data.limit or math.huge
|
||||
local sAngle = (data.rotation or 0) * math.pi / 180
|
||||
local arc = (data.fullCircle and 360 or data.arcLength or 0) * math.pi / 180
|
||||
@@ -736,7 +738,7 @@ local growers = {
|
||||
for frame, regionDatas in pairs(frames) do
|
||||
local numVisible = min(limit, #regionDatas)
|
||||
local r
|
||||
if constantFactor == "RADIUS" then
|
||||
if constantFactor == "RADIUS" or constantFactor == "ANGLE" then
|
||||
r = radius
|
||||
else
|
||||
if numVisible <= 1 then
|
||||
@@ -749,6 +751,8 @@ local growers = {
|
||||
local dAngle
|
||||
if numVisible == 1 then
|
||||
dAngle = 0
|
||||
elseif constantFactor == "ANGLE" then
|
||||
dAngle = stepAngle
|
||||
elseif not data.fullCircle then
|
||||
dAngle = arc / (numVisible - 1)
|
||||
else
|
||||
@@ -770,6 +774,7 @@ local growers = {
|
||||
local constantFactor = data.constantFactor
|
||||
local space = data.space or 0
|
||||
local radius = data.radius or 0
|
||||
local stepAngle = (data.stepAngle or 0) * math.pi / 180
|
||||
local limit = data.useLimit and data.limit or math.huge
|
||||
local sAngle = (data.rotation or 0) * math.pi / 180
|
||||
local arc = (data.fullCircle and 360 or data.arcLength or 0) * math.pi / 180
|
||||
@@ -787,7 +792,7 @@ local growers = {
|
||||
for frame, regionDatas in pairs(frames) do
|
||||
local numVisible = min(limit, #regionDatas)
|
||||
local r
|
||||
if constantFactor == "RADIUS" then
|
||||
if constantFactor == "RADIUS" or constantFactor == "ANGLE" then
|
||||
r = radius
|
||||
else
|
||||
if numVisible <= 1 then
|
||||
@@ -800,6 +805,8 @@ local growers = {
|
||||
local dAngle
|
||||
if numVisible == 1 then
|
||||
dAngle = 0
|
||||
elseif constantFactor == "ANGLE" then
|
||||
dAngle = -stepAngle
|
||||
elseif not data.fullCircle then
|
||||
dAngle = arc / (1 - numVisible)
|
||||
else
|
||||
@@ -1374,7 +1381,19 @@ local function modify(parent, region, data)
|
||||
or data.anchorFrameType == "MOUSE")
|
||||
))
|
||||
then
|
||||
controlPoint:SetParent(frame == "" and self.relativeTo or frame)
|
||||
local parent
|
||||
if frame == "" then
|
||||
parent = self.relativeTo
|
||||
else
|
||||
if type(frame) == "string" then
|
||||
parent = _G[frame]
|
||||
else
|
||||
parent = frame
|
||||
end
|
||||
end
|
||||
if parent and parent.IsObjectType and parent:IsObjectType("Frame") then
|
||||
controlPoint:SetParent(parent)
|
||||
end
|
||||
else
|
||||
controlPoint:SetParent(self)
|
||||
end
|
||||
|
||||
@@ -81,6 +81,12 @@ local function modify(parent, region, data)
|
||||
local text = region.text;
|
||||
|
||||
local fontPath = SharedMedia:Fetch("font", data.font);
|
||||
if not text:GetFont() and fontPath then -- workaround font not loading correctly
|
||||
local objectName = "WeakAuras-Font-" .. data.font
|
||||
local fontObject = _G[objectName] or CreateFont(objectName)
|
||||
fontObject:SetFont(fontPath, data.fontSize < 33 and data.fontSize or 33, data.outline)
|
||||
text:SetFontObject(fontObject)
|
||||
end
|
||||
text:SetFont(fontPath, data.fontSize < 33 and data.fontSize or 33, data.outline);
|
||||
if not text:GetFont() then -- Font invalid, set the font but keep the setting
|
||||
text:SetFont(STANDARD_TEXT_FONT, data.fontSize <= 33 and data.fontSize or 33, data.outline);
|
||||
|
||||
Reference in New Issue
Block a user