WoWInterface SVN oUF_Hank

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 16 to Rev 17
    Reverse comparison

Rev 16 → Rev 17

trunk/oUF_Hank_v3/oUF_Hank_v3.toc
1,7 → 1,7
## Interface: 40100
## Interface: 40200
## Title: oUF_Hank_v3
## Author: Hank
## Version: 3.0.10b
## Version: 3.0.11
## Dependencies: oUF
## OptionalDeps: oUF_SpellRange, oUF_Totembar
## Notes: oUF layout for |cFFFFA628hank|rui
trunk/oUF_Hank_v3/hank_v3.lua
1102,13 → 1102,8
self.EclipseBar.counter:SetFontObject("UFFontMedium")
self.EclipseBar.counter:SetPoint("RIGHT", self.EclipseBar, "LEFT", -5, 0)
 
-- Initialize direction (oUF doesn't do that before direction changes)
if GetEclipseDirection() == "sun" then
self.EclipseBar.directionIsLunar = true
self.EclipseBar.direction:SetVertexColor(unpack(cfg.colors.power.ECLIPSE.LUNAR))
else
self.EclipseBar.direction:SetVertexColor(unpack(cfg.colors.power.ECLIPSE.SOLAR))
end
-- Initialize direction on load
self.EclipseBar.direction:SetVertexColor(unpack(cfg.colors.power.ECLIPSE[GetEclipseDirection() == "sun" and "SOLAR" or "LUNAR"]))
 
-- Play direction indicator animation on direction change (100% solar or lunar)
self.EclipseBar.PostDirectionChange = function()
1116,11 → 1111,7
self.EclipseBar:SetScript("OnUpdate", function(_ , elapsed)
AnimateTexCoords(self.EclipseBar.direction, 256, 64, 22, 22, 11, elapsed, 0.025)
if self.EclipseBar.direction.frame > 6 then
if self.EclipseBar.directionIsLunar then
self.EclipseBar.direction:SetVertexColor(unpack(cfg.colors.power.ECLIPSE.LUNAR))
else
self.EclipseBar.direction:SetVertexColor(unpack(cfg.colors.power.ECLIPSE.SOLAR))
end
self.EclipseBar.direction:SetVertexColor(unpack(cfg.colors.power.ECLIPSE[GetEclipseDirection() == "sun" and "SOLAR" or "LUNAR"]))
end
if self.EclipseBar.direction.frame == 11 then
self.EclipseBar:SetScript("OnUpdate", nil)
1135,7 → 1126,7
-- Solar / lunar power updated
self.EclipseBar.PostUpdatePower = function()
-- Currently in solar phase
if self.EclipseBar.SolarBar:GetValue() > self.EclipseBar.LunarBar:GetValue() then
if self.EclipseBar.SolarBar:GetValue() < self.EclipseBar.LunarBar:GetValue() then
-- Solar phase has just been entered => play animation
if self.EclipseBar.lastPhase == "moon" then
self.EclipseBar.bg.frame = nil
1154,10 → 1145,10
end
 
-- Fill circle
self.EclipseBar.fill:SetTexCoord((10 - math.floor(self.EclipseBar.SolarBar:GetValue() / 10)) * 22 / 256, (11 - math.floor(self.EclipseBar.SolarBar:GetValue() / 10)) * 22 / 256, 22 / 64, 44 / 64)
self.EclipseBar.fill:SetTexCoord((10 + math.floor(self.EclipseBar.SolarBar:GetValue() / 10)) * 22 / 256, (11 + math.floor(self.EclipseBar.SolarBar:GetValue() / 10)) * 22 / 256, 22 / 64, 44 / 64)
 
-- Update cast counter
if self.EclipseBar.directionIsLunar then
if GetEclipseDirection() == "sun" then
self.EclipseBar.counter:SetText(math.ceil((100 + self.EclipseBar.SolarBar:GetValue()) / 20) .. " Starfires")
else
self.EclipseBar.counter:SetText(math.ceil((100 - self.EclipseBar.SolarBar:GetValue()) / 13) .. " Wraths")
1184,10 → 1175,10
end
 
-- Fill circle
self.EclipseBar.fill:SetTexCoord((11 - math.floor(self.EclipseBar.LunarBar:GetValue() / 10)) * 22 / 256, (10 - math.floor(self.EclipseBar.LunarBar:GetValue() / 10)) * 22 / 256, 22 / 64, 44 / 64)
self.EclipseBar.fill:SetTexCoord((11 + math.floor(self.EclipseBar.LunarBar:GetValue() / 10)) * 22 / 256, (10 + math.floor(self.EclipseBar.LunarBar:GetValue() / 10)) * 22 / 256, 22 / 64, 44 / 64)
 
-- Update cast counter
if self.EclipseBar.directionIsLunar then
if GetEclipseDirection() == "sun" then
self.EclipseBar.counter:SetText(math.ceil((100 - self.EclipseBar.LunarBar:GetValue()) / 20) .. " Starfires")
else
self.EclipseBar.counter:SetText(math.ceil((100 + self.EclipseBar.LunarBar:GetValue()) / 13) .. " Wraths")