Shadowshight timer lockable
This commit is contained in:
parent
4e0ea70bfa
commit
17a983fad6
@ -5,6 +5,7 @@ local Gladdy = LibStub("Gladdy")
|
|||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local ShadowsightTimer = Gladdy:NewModule("Shadowsight Timer", nil, {
|
local ShadowsightTimer = Gladdy:NewModule("Shadowsight Timer", nil, {
|
||||||
shadowsightTimerEnabled = true,
|
shadowsightTimerEnabled = true,
|
||||||
|
shadowsightTimerLocked = false,
|
||||||
shadowsightTimerScale = 1,
|
shadowsightTimerScale = 1,
|
||||||
shadowsightTimerRelPoint1 = "CENTER",
|
shadowsightTimerRelPoint1 = "CENTER",
|
||||||
shadowsightTimerRelPoint2 = "CENTER",
|
shadowsightTimerRelPoint2 = "CENTER",
|
||||||
@ -94,6 +95,10 @@ function ShadowsightTimer:CreateTimerFrame()
|
|||||||
self.timerFrame:Hide()
|
self.timerFrame:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ShadowsightTimer:UpdateFrameOnce()
|
||||||
|
self.timerFrame:EnableMouse(not Gladdy.db.shadowsightTimerLocked)
|
||||||
|
end
|
||||||
|
|
||||||
function ShadowsightTimer:UpdateFrame()
|
function ShadowsightTimer:UpdateFrame()
|
||||||
if Gladdy.db.shadowsightTimerEnabled then
|
if Gladdy.db.shadowsightTimerEnabled then
|
||||||
self.timerFrame:SetScale(Gladdy.db.shadowsightTimerScale)
|
self.timerFrame:SetScale(Gladdy.db.shadowsightTimerScale)
|
||||||
@ -109,7 +114,7 @@ function ShadowsightTimer:UpdateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ShadowsightTimer:Start()
|
function ShadowsightTimer:Start()
|
||||||
self.timerFrame.endTime = 92
|
self.timerFrame.endTime = 91
|
||||||
self.timerFrame.timeSinceLastUpdate = 0
|
self.timerFrame.timeSinceLastUpdate = 0
|
||||||
self.timerFrame:SetScript("OnUpdate", ShadowsightTimer.OnUpdate)
|
self.timerFrame:SetScript("OnUpdate", ShadowsightTimer.OnUpdate)
|
||||||
end
|
end
|
||||||
@ -149,17 +154,24 @@ function ShadowsightTimer:GetOptions()
|
|||||||
order = 3,
|
order = 3,
|
||||||
width = "full",
|
width = "full",
|
||||||
}),
|
}),
|
||||||
|
shadowsightTimerLocked = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Locked"],
|
||||||
|
--desc = L["Turns countdown before the start of an arena match on/off."],
|
||||||
|
order = 4,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
shadowsightAnnounce = Gladdy:option({
|
shadowsightAnnounce = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Announce"],
|
name = L["Announce"],
|
||||||
--desc = L["Turns countdown before the start of an arena match on/off."],
|
--desc = L["Turns countdown before the start of an arena match on/off."],
|
||||||
order = 4,
|
order = 5,
|
||||||
width = "full",
|
width = "full",
|
||||||
}),
|
}),
|
||||||
shadowsightTimerScale = Gladdy:option({
|
shadowsightTimerScale = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Scale"],
|
name = L["Scale"],
|
||||||
order = 5,
|
order = 6,
|
||||||
min = 0.1,
|
min = 0.1,
|
||||||
max = 5,
|
max = 5,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
Loading…
Reference in New Issue
Block a user