Skip to content

Commit

Permalink
2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Hydra-Mods committed Jul 16, 2023
1 parent 1442ac5 commit 1a435a5
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 31 deletions.
37 changes: 24 additions & 13 deletions Elements/ActionBars/MicroMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,17 @@ function MicroButtons:Load()
local Disabled = self.Buttons[i]:GetDisabledTexture()
local Highlight = self.Buttons[i]:GetHighlightTexture()

Normal:ClearAllPoints()
Normal:SetPoint("TOPLEFT", self.Buttons[i], 2, -2)
Normal:SetPoint("BOTTOMRIGHT", self.Buttons[i], -2, 2)
if Normal then
Normal:ClearAllPoints()
Normal:SetPoint("TOPLEFT", self.Buttons[i], 2, -2)
Normal:SetPoint("BOTTOMRIGHT", self.Buttons[i], -2, 2)
end

Pushed:ClearAllPoints()
Pushed:SetPoint("TOPLEFT", self.Buttons[i], 2, -2)
Pushed:SetPoint("BOTTOMRIGHT", self.Buttons[i], -2, 2)
if Pushed then
Pushed:ClearAllPoints()
Pushed:SetPoint("TOPLEFT", self.Buttons[i], 2, -2)
Pushed:SetPoint("BOTTOMRIGHT", self.Buttons[i], -2, 2)
end

if Disabled then
Disabled:ClearAllPoints()
Expand All @@ -207,19 +211,26 @@ function MicroButtons:Load()
end

if (not HydraUI.IsMainline) then
Normal:SetTexCoord(0.2, 0.85, 0.5, 0.9)
Pushed:SetTexCoord(0.2, 0.85, 0.5, 0.9)
if Normal then
Normal:SetTexCoord(0.2, 0.85, 0.5, 0.9)
end

if Pushed then
Pushed:SetTexCoord(0.2, 0.85, 0.5, 0.9)
end

if Disabled then
Disabled:SetTexCoord(0.2, 0.85, 0.5, 0.9)
end
end

Highlight:ClearAllPoints()
Highlight:SetPoint("TOPLEFT", self.Buttons[i], 2, -2)
Highlight:SetPoint("BOTTOMRIGHT", self.Buttons[i], -2, 2)
Highlight:SetTexture(Assets:GetTexture("Blank"))
Highlight:SetVertexColor(1, 1, 1, 0.2)
if Highlight then
Highlight:ClearAllPoints()
Highlight:SetPoint("TOPLEFT", self.Buttons[i], 2, -2)
Highlight:SetPoint("BOTTOMRIGHT", self.Buttons[i], -2, 2)
Highlight:SetTexture(Assets:GetTexture("Blank"))
Highlight:SetVertexColor(1, 1, 1, 0.2)
end
end

if MicroButtonPortrait then
Expand Down
12 changes: 6 additions & 6 deletions Elements/Libraries/oUF/elements/additionalpower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ local oUF = ns.oUF
local _, playerClass = UnitClass('player')

-- sourced from FrameXML/AlternatePowerBar.lua
local ADDITIONAL_POWER_BAR_NAME = _G.ADDITIONAL_POWER_BAR_NAME or 'MANA'
local ADDITIONAL_POWER_BAR_INDEX = _G.ADDITIONAL_POWER_BAR_INDEX or 0
local ALT_MANA_BAR_PAIR_DISPLAY_INFO = _G.ALT_MANA_BAR_PAIR_DISPLAY_INFO
local ALT_POWER_BAR_PAIR_DISPLAY_INFO = _G.ALT_POWER_BAR_PAIR_DISPLAY_INFO
local ADDITIONAL_POWER_BAR_NAME = 'MANA'
local ADDITIONAL_POWER_BAR_INDEX = 0

local function UpdateColor(self, event, unit, powerType)
if(not (unit and UnitIsUnit(unit, 'player') and powerType == ADDITIONAL_POWER_BAR_NAME)) then return end
Expand Down Expand Up @@ -272,10 +272,10 @@ local function Enable(self, unit)
self:RegisterEvent('UNIT_DISPLAYPOWER', VisibilityPath)

if(not element.displayPairs) then
element.displayPairs = CopyTable(ALT_MANA_BAR_PAIR_DISPLAY_INFO)
element.displayPairs = CopyTable(ALT_POWER_BAR_PAIR_DISPLAY_INFO)
end

if(element:IsObjectType('StatusBar') and not (element:GetStatusBarTexture() or element:GetStatusBarAtlas())) then
if(element:IsObjectType('StatusBar') and not element:GetStatusBarTexture()) then
element:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]])
end

Expand All @@ -292,4 +292,4 @@ local function Disable(self)
end
end

oUF:AddElement('AdditionalPower', VisibilityPath, Enable, Disable)
oUF:AddElement('AdditionalPower', VisibilityPath, Enable, Disable)
16 changes: 7 additions & 9 deletions Elements/Libraries/oUF/elements/powerprediction.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ local _, ns = ...
local oUF = ns.oUF

-- sourced from FrameXML/AlternatePowerBar.lua
local ADDITIONAL_POWER_BAR_INDEX = _G.ADDITIONAL_POWER_BAR_INDEX or 0
local ALT_MANA_BAR_PAIR_DISPLAY_INFO = _G.ALT_MANA_BAR_PAIR_DISPLAY_INFO
local ALT_POWER_BAR_PAIR_DISPLAY_INFO = _G.ALT_POWER_BAR_PAIR_DISPLAY_INFO
local ADDITIONAL_POWER_BAR_INDEX = 0

local _, playerClass = UnitClass('player')

Expand All @@ -66,8 +66,8 @@ local function Update(self, event, unit)

local _, _, _, startTime, endTime, _, _, _, spellID = UnitCastingInfo(unit)
local mainPowerType = UnitPowerType(unit)
local hasAltManaBar = ALT_MANA_BAR_PAIR_DISPLAY_INFO[playerClass]
and ALT_MANA_BAR_PAIR_DISPLAY_INFO[playerClass][mainPowerType]
local hasAltManaBar = ALT_POWER_BAR_PAIR_DISPLAY_INFO[playerClass]
and ALT_POWER_BAR_PAIR_DISPLAY_INFO[playerClass][mainPowerType]
local mainCost, altCost = 0, 0

if(event == 'UNIT_SPELLCAST_START' and startTime ~= endTime) then
Expand Down Expand Up @@ -155,15 +155,13 @@ local function Enable(self, unit)
self:RegisterEvent('UNIT_DISPLAYPOWER', Path)

if(element.mainBar) then
if(element.mainBar:IsObjectType('StatusBar')
and not (element.mainBar:GetStatusBarTexture() or element.mainBar:GetStatusBarAtlas())) then
if(element.mainBar:IsObjectType('StatusBar') and not element.mainBar:GetStatusBarTexture()) then
element.mainBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]])
end
end

if(element.altBar) then
if(element.altBar:IsObjectType('StatusBar')
and not (element.altBar:GetStatusBarTexture() or element.altBar:GetStatusBarAtlas())) then
if(element.altBar:IsObjectType('StatusBar') and not element.altBar:GetStatusBarTexture()) then
element.altBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]])
end
end
Expand Down Expand Up @@ -191,4 +189,4 @@ local function Disable(self)
end
end

oUF:AddElement('PowerPrediction', Path, Enable, Disable)
oUF:AddElement('PowerPrediction', Path, Enable, Disable)
4 changes: 4 additions & 0 deletions Elements/MirrorTimers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ MirrorTimers.MirrorTimer_Show = function(timer, value, maxvalue, scale, paused,
end

function MirrorTimers:Load()
if HydraUI.IsMainline then
return -- Patch 10.1.5; Need a rewrite
end

self.Bar = CreateFrame("StatusBar", "HydraUI Timers Bar", HydraUI.UIParent)
self.Bar:SetPoint("TOP", HydraUI.UIParent, 0, -120)
self.Bar:SetSize(210, 20)
Expand Down
2 changes: 1 addition & 1 deletion HydraUI-Classic.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 11403
## Author: Hydra
## Version: 2.11
## Version: 2.12
## Title: |cFFFFC44DHydra|r|cFFFFFFFFUI|r
## Notes: Interface replacement for Classic and Season of Mastery
## SavedVariables: HydraUIProfileData, HydraUIProfiles, HydraUIData, HydraUIGold
Expand Down
2 changes: 1 addition & 1 deletion HydraUI-Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 30402
## Author: Hydra
## Version: 2.11
## Version: 2.12
## Title: |cFFFFC44DHydra|r|cFFFFFFFFUI|r
## Notes: Interface replacement for Wrath of the Lich King
## SavedVariables: HydraUIProfileData, HydraUIProfiles, HydraUIData, HydraUIGold
Expand Down
2 changes: 1 addition & 1 deletion HydraUI.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 100105
## Author: Hydra
## Version: 2.11
## Version: 2.12
## Title: |cFFFFC44DHydra|r|cFFFFFFFFUI|r
## Notes: Interface replacement for Shadowlands
## SavedVariables: HydraUIProfileData, HydraUIProfiles, HydraUIData, HydraUIGold
Expand Down

0 comments on commit 1a435a5

Please sign in to comment.