hide blizzard
This commit is contained in:
parent
85f63e590b
commit
0c4409fe16
10
Gladdy.lua
10
Gladdy.lua
@ -200,6 +200,7 @@ function Gladdy:OnInitialize()
|
||||
self.LSM:Register("border", "Gladdy Tooltip round", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_round_selfmade")
|
||||
self.LSM:Register("border", "Gladdy Tooltip squared", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_square_selfmade")
|
||||
self.LSM:Register("font", "DorisPP", "Interface\\AddOns\\Gladdy\\Images\\DorisPP.TTF")
|
||||
self.LSM:Register("border", "Square Full White", "Interface\\AddOns\\Gladdy\\Images\\Square_FullWhite.tga")
|
||||
|
||||
L = self.L
|
||||
|
||||
@ -227,6 +228,9 @@ function Gladdy:OnInitialize()
|
||||
self:Call(v, "Initialize") -- B.E > A.E :D
|
||||
end
|
||||
self:DeleteUnknownOptions(self.db, self.defaults.profile)
|
||||
if Gladdy.db.hideBlizzard == "always" then
|
||||
SetCVar("showArenaEnemyFrames", 0)
|
||||
end
|
||||
end
|
||||
|
||||
function Gladdy:OnProfileChanged()
|
||||
@ -355,6 +359,9 @@ function Gladdy:Reset()
|
||||
for unit in pairs(self.buttons) do
|
||||
self:ResetUnit(unit)
|
||||
end
|
||||
if Gladdy.db.hideBlizzard == "never" or Gladdy.db.hideBlizzard == "arena" then
|
||||
SetCVar("showArenaEnemyFrames", 1)
|
||||
end
|
||||
end
|
||||
|
||||
function Gladdy:ResetUnit(unit)
|
||||
@ -412,4 +419,7 @@ function Gladdy:JoinedArena()
|
||||
for i=1, self.curBracket do
|
||||
self.buttons["arena" .. i]:SetAlpha(1)
|
||||
end
|
||||
if Gladdy.db.hideBlizzard == "arena" or Gladdy.db.hideBlizzard == "always" then
|
||||
SetCVar("showArenaEnemyFrames", 0)
|
||||
end
|
||||
end
|
||||
|
18
Options.lua
18
Options.lua
@ -13,6 +13,7 @@ local L = Gladdy.L
|
||||
Gladdy.defaults = {
|
||||
profile = {
|
||||
locked = false,
|
||||
hideBlizzard = "arena",
|
||||
x = 0,
|
||||
y = 0,
|
||||
growUp = false,
|
||||
@ -97,6 +98,11 @@ local function setOpt(info, value)
|
||||
local key = info.arg or info[#info]
|
||||
Gladdy.dbi.profile[key] = value
|
||||
Gladdy:UpdateFrame()
|
||||
if Gladdy.db.hideBlizzard == "always" then
|
||||
SetCVar("showArenaEnemyFrames", 0)
|
||||
elseif Gladdy.db.hideBlizzard == "never" then
|
||||
SetCVar("showArenaEnemyFrames", 1)
|
||||
end
|
||||
end
|
||||
local function getColorOpt(info)
|
||||
local key = info.arg or info[#info]
|
||||
@ -205,10 +211,20 @@ function Gladdy:SetupOptions()
|
||||
["RIGHT"] = L["Right"],
|
||||
}
|
||||
},
|
||||
hideBlizzard = {
|
||||
type = "select",
|
||||
name = L["Hide Blizzard"],
|
||||
values = {
|
||||
["arena"] = L["Arena only"],
|
||||
["never"] = L["Never"],
|
||||
["always"] = L["Always"],
|
||||
},
|
||||
order = 4,
|
||||
},
|
||||
group = {
|
||||
type = "group",
|
||||
name = L["General"],
|
||||
order = 4,
|
||||
order = 5,
|
||||
childGroups = "tree",
|
||||
args = {
|
||||
frameGeneral = {
|
||||
|
Loading…
Reference in New Issue
Block a user