added single background for all frames
This commit is contained in:
parent
f92b3a4964
commit
751e84c61d
@ -32,6 +32,12 @@ Gladdy.BUTTON_DEFAULTS = {
|
|||||||
|
|
||||||
function Gladdy:CreateFrame()
|
function Gladdy:CreateFrame()
|
||||||
self.frame = CreateFrame("Frame", "GladdyFrame", UIParent)
|
self.frame = CreateFrame("Frame", "GladdyFrame", UIParent)
|
||||||
|
|
||||||
|
self.frame.background = CreateFrame("Frame", nil, self.frame, BackdropTemplateMixin and "BackdropTemplate")
|
||||||
|
self.frame.background:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = false, tileSize = 16})
|
||||||
|
self.frame.background:SetFrameStrata("BACKGROUND")
|
||||||
|
self.frame.background:SetBackdropColor(self.db.backgroundColor.r, self.db.backgroundColor.g, self.db.backgroundColor.b, self.db.backgroundColor.a)
|
||||||
|
self.frame.background:SetAllPoints(self.frame)
|
||||||
--self.frame.texture = self.frame:CreateTexture(nil, "OVERLAY")
|
--self.frame.texture = self.frame:CreateTexture(nil, "OVERLAY")
|
||||||
--self.frame.texture:SetAllPoints(self.frame)
|
--self.frame.texture:SetAllPoints(self.frame)
|
||||||
--self.frame.texture:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp")
|
--self.frame.texture:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp")
|
||||||
@ -186,6 +192,8 @@ function Gladdy:UpdateFrame()
|
|||||||
self.frame:SetScale(self.db.frameScale)
|
self.frame:SetScale(self.db.frameScale)
|
||||||
self.frame:SetWidth(width)
|
self.frame:SetWidth(width)
|
||||||
self.frame:SetHeight(height)
|
self.frame:SetHeight(height)
|
||||||
|
self.frame:ClearAllPoints()
|
||||||
|
self.frame.background:SetBackdropColor(self.db.backgroundColor.r, self.db.backgroundColor.g, self.db.backgroundColor.b, self.db.backgroundColor.a)
|
||||||
--self.frame:SetBackdropColor(self.db.frameColor.r, self.db.frameColor.g, self.db.frameColor.b, self.db.frameColor.a)
|
--self.frame:SetBackdropColor(self.db.frameColor.r, self.db.frameColor.g, self.db.frameColor.b, self.db.frameColor.a)
|
||||||
self.frame:ClearAllPoints()
|
self.frame:ClearAllPoints()
|
||||||
if (self.db.x == 0 and self.db.y == 0) then
|
if (self.db.x == 0 and self.db.y == 0) then
|
||||||
|
18
Options.lua
18
Options.lua
@ -53,7 +53,8 @@ Gladdy.defaults = {
|
|||||||
barWidth = 180,
|
barWidth = 180,
|
||||||
bottomMargin = 2,
|
bottomMargin = 2,
|
||||||
statusbarBorderOffset = 6,
|
statusbarBorderOffset = 6,
|
||||||
timerFormat = Gladdy.TIMER_FORMAT.tenths
|
timerFormat = Gladdy.TIMER_FORMAT.tenths,
|
||||||
|
backgroundColor = {r = 0, g = 0, b = 0, a = 0},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,12 +226,6 @@ function Gladdy:SetupOptions()
|
|||||||
desc = L["Toggle if frame can be moved"],
|
desc = L["Toggle if frame can be moved"],
|
||||||
order = 1,
|
order = 1,
|
||||||
},
|
},
|
||||||
growUp = {
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Grow frame upwards"],
|
|
||||||
desc = L["If enabled the frame will grow upwards instead of downwards"],
|
|
||||||
order = 2,
|
|
||||||
},
|
|
||||||
growDirection = {
|
growDirection = {
|
||||||
type = "select",
|
type = "select",
|
||||||
name = L["Grow Direction"],
|
name = L["Grow Direction"],
|
||||||
@ -304,6 +299,15 @@ function Gladdy:SetupOptions()
|
|||||||
max = 200,
|
max = 200,
|
||||||
step = 1,
|
step = 1,
|
||||||
},
|
},
|
||||||
|
backgroundColor = {
|
||||||
|
type = "color",
|
||||||
|
name = L["Background color"],
|
||||||
|
desc = L["Background Color of the frame"],
|
||||||
|
order = 8,
|
||||||
|
hasAlpha = true,
|
||||||
|
get = getColorOpt,
|
||||||
|
set = setColorOpt,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cooldownGeneral = {
|
cooldownGeneral = {
|
||||||
|
Loading…
Reference in New Issue
Block a user