mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- Added support for rotation in the new bar resizing system.
- Enabled bar rotation for the CastBar module.
This commit is contained in:
@ -1135,7 +1135,11 @@ function IceBarElement.prototype:SetBarCoord(barFrame, scale, top)
|
|||||||
max_y = scale
|
max_y = scale
|
||||||
offset_y = (self.settings.barHeight * (1 - scale))
|
offset_y = (self.settings.barHeight * (1 - scale))
|
||||||
end
|
end
|
||||||
|
if self.moduleSettings.rotateBar then
|
||||||
|
self:SetBarFramePoints(barFrame, offset_y, 0)
|
||||||
|
else
|
||||||
self:SetBarFramePoints(barFrame, 0, offset_y)
|
self:SetBarFramePoints(barFrame, 0, offset_y)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if self.moduleSettings.inverse == "INVERSE" then
|
if self.moduleSettings.inverse == "INVERSE" then
|
||||||
min_y = 0;
|
min_y = 0;
|
||||||
@ -1392,7 +1396,7 @@ end
|
|||||||
|
|
||||||
function IceBarElement.prototype:RotateHorizontal()
|
function IceBarElement.prototype:RotateHorizontal()
|
||||||
self:RotateFrame(self.frame)
|
self:RotateFrame(self.frame)
|
||||||
self:RotateFrame(self.barFrame)
|
--self:RotateFrame(self.barFrame)
|
||||||
for i=1, #self.Markers do
|
for i=1, #self.Markers do
|
||||||
self.Markers[i]:Hide()
|
self.Markers[i]:Hide()
|
||||||
end
|
end
|
||||||
@ -1427,7 +1431,7 @@ function IceBarElement.prototype:RotateFrame(frame)
|
|||||||
frame.anim = grp
|
frame.anim = grp
|
||||||
end
|
end
|
||||||
|
|
||||||
local anchorPoint
|
local anchorPoint = "LEFT"
|
||||||
if self.moduleSettings.inverse == "INVERSE" then
|
if self.moduleSettings.inverse == "INVERSE" then
|
||||||
anchorPoint = "TOPLEFT"
|
anchorPoint = "TOPLEFT"
|
||||||
elseif self.moduleSettings.inverse == "EXPAND" then
|
elseif self.moduleSettings.inverse == "EXPAND" then
|
||||||
|
@ -34,7 +34,7 @@ function CastBar.prototype:GetDefaultSettings()
|
|||||||
settings["hideAnimationSettings"] = true
|
settings["hideAnimationSettings"] = true
|
||||||
settings["usesDogTagStrings"] = false
|
settings["usesDogTagStrings"] = false
|
||||||
settings["rangeColor"] = true
|
settings["rangeColor"] = true
|
||||||
settings["shouldHideBarRotation"] = true
|
settings["shouldHideBarRotation"] = false
|
||||||
settings["bAllowExpand"] = false
|
settings["bAllowExpand"] = false
|
||||||
|
|
||||||
return settings
|
return settings
|
||||||
@ -294,13 +294,7 @@ function CastBar.prototype:GetOptions()
|
|||||||
return opts
|
return opts
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function CastBar.prototype:Enable(core)
|
function CastBar.prototype:Enable(core)
|
||||||
if self.moduleSettings.rotateBar then
|
|
||||||
self.moduleSettings.rotateBar = false
|
|
||||||
self:ResetRotation()
|
|
||||||
end
|
|
||||||
|
|
||||||
CastBar.super.prototype.Enable(self, core)
|
CastBar.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
||||||
|
Reference in New Issue
Block a user