/
desc = "Toggles the ui's locked state, preventing it from being moved.", |
get = function(info) return RuneWatch.db.locked end, |
set = function(info, v) RuneWatch.db.locked = v; RuneWatch:GuiUpdate(); end |
}, |
scale = { |
type = "range", |
name = "UI Scale", |
desc = "Scales the UI to a factor of the default.", |
min = 0.1, |
max = 5, |
step = 0.1, |
get = function(info) return RuneWatch.db.scale end, |
set = function(info, v) RuneWatch.db.scale = v; RuneWatch:GuiUpdate(); end |
} |
} |
} |
self.dbase = LibStub("AceDB-3.0"):New("RuneWatchDB"); |
self.dbase:RegisterDefaults({ |
profile = { |
locked = true |
locked = true, |
scale = 1.0 |
} |
}); |
self.db = self.dbase.profile; |
self.Gui.Drag:Show(); |
end |
-- UI Scale |
self.Gui.Anchor:SetScale(RuneWatch.db.scale); |
local _, uclass = UnitClass("Player"); |
if (uclass ~= "DEATHKNIGHT") then |
--self:Print("Not a Deathknight"); |
local offset = GetTime() - start; |
local timer = ceil(duration - offset); |
self.Timer:SetText(timer); |
-- Fix for rune-timeout when dead |
if (timer <= 0) then |
self.Timer:Hide(); |
self.Image:SetVertexColor(1,1,1,1); |
self:SetScript("OnUpdate", nil); |
else |
self.Timer:SetText(timer); |
end |
end |
if ( runeReady ) then |