mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Bugfixes & improved RoundBar texture
This commit is contained in:
@ -71,17 +71,24 @@ function IceElement.prototype:IsEnabled()
|
||||
end
|
||||
|
||||
|
||||
function IceElement.prototype:Enable()
|
||||
function IceElement.prototype:Enable(core)
|
||||
if (not core) then
|
||||
self.moduleSettings.enabled = true
|
||||
end
|
||||
self.frame:Show()
|
||||
end
|
||||
|
||||
|
||||
function IceElement.prototype:Disable()
|
||||
function IceElement.prototype:Disable(core)
|
||||
if (not core) then
|
||||
self.moduleSettings.enabled = false
|
||||
end
|
||||
self.frame:Hide()
|
||||
self:UnregisterAllEvents()
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- inherting classes should override this and provide
|
||||
-- make sure they refresh any changes made to them
|
||||
function IceElement.prototype:Redraw()
|
||||
@ -104,7 +111,7 @@ function IceElement.prototype:GetOptions()
|
||||
set = function(value)
|
||||
self.moduleSettings.enabled = value
|
||||
if (value) then
|
||||
self:Enable()
|
||||
self:Enable(true)
|
||||
else
|
||||
self:Disable()
|
||||
end
|
||||
@ -129,6 +136,9 @@ function IceElement.prototype:GetOptions()
|
||||
self.moduleSettings.scale = value
|
||||
self:Redraw()
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
order = 21
|
||||
}
|
||||
|
||||
@ -155,7 +165,7 @@ function IceElement.prototype:CreateFrame()
|
||||
if not (self.frame) then
|
||||
self.frame = CreateFrame("Frame", "IceHUD_"..self.name, self.parent)
|
||||
end
|
||||
|
||||
|
||||
self.frame:SetScale(self.moduleSettings.scale)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user