Skip to content

Commit

Permalink
there I fixed it
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuller committed Mar 20, 2024
1 parent a0bc779 commit ee83de8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dominos/Dominos.toc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bars\menuBar.lua
bars\petBar.lua
bars\petBar.classic.lua
bars\possessBar.lua
# bars\queueStatusBar.lua
bars\queueStatusBar.lua
bars\stanceBar.lua
bars\stanceBar.classic.lua
bars\talkingHeadBar.lua
Expand Down
6 changes: 4 additions & 2 deletions Dominos/bars/bagBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
--------------------------------------------------------------------------------

local AddonName, Addon = ...
if Addon:IsBuild("retail") then return end

local L = LibStub("AceLocale-3.0"):GetLocale(AddonName)

-- register buttons for use later
Expand Down Expand Up @@ -184,6 +182,10 @@ function BagBarModule:Unload()
end

function BagBarModule:OnFirstLoad()
if BagsBar then
BagsBar:SetParent(Addon.ShadowUIParent)
end

-- use our own handlign for the blizzard bag bar
if MainMenuBarManager then
EventRegistry:UnregisterCallback("MainMenuBarManager.OnExpandChanged", MainMenuBarManager)
Expand Down
33 changes: 26 additions & 7 deletions Dominos/bars/menuBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,27 @@
--------------------------------------------------------------------------------

local AddonName, Addon = ...
if Addon:IsBuild("retail") then return end

local L = LibStub('AceLocale-3.0'):GetLocale(AddonName)

local MicroButtons = {}
local PetMicroButtonFrame = PetBattleFrame and PetBattleFrame.BottomFrame.MicroButtonFrame

if MicroMenu then
local function registerButtons(...)
local function registerButtons(t, ...)
for i = 1, select('#', ...) do
local button = select(i, ...)

-- always reparent the button
button:SetParent(Addon.ShadowUIParent)

-- ...but only display it on our bar if it was already enabled
if button:IsShown() then
MicroButtons[#MicroButtons + 1] = button
t[#t + 1] = button
end
end
end

registerButtons(MicroMenu:GetChildren())
registerButtons(MicroButtons, MicroMenu:GetChildren())
else
local MICRO_BUTTONS = _G.MICRO_BUTTONS or {
"CharacterMicroButton",
Expand Down Expand Up @@ -335,14 +337,31 @@ function MenuBarModule:OnFirstLoad()

hooksecurefunc("UpdateMicroButtons", layout)

-- ensure that the micro menu remains banished
-- otherwise, it'll try laying itself out again and trigger an error
if MicroMenu then
MicroMenu:SetParent(Addon.ShadowUIParent)

hooksecurefunc(MicroMenu, "SetParent", function(menu, parent)
if parent == MicroMenuContainer then
menu:SetParent(Addon.ShadowUIParent)
end
end)
end

-- banish the micro menu container
if MicroMenuContainer then
MicroMenuContainer:SetParent(Addon.ShadowUIParent)
end

if OverrideActionBar then
local f = CreateFrame('Frame', nil, OverrideActionBar)
local f = CreateFrame("Frame", nil, OverrideActionBar)
f:SetScript("OnShow", layout)
f:SetScript("OnHide", layout)
end

if PetMicroButtonFrame then
local f = CreateFrame('Frame', nil, PetMicroButtonFrame)
local f = CreateFrame("Frame", nil, PetMicroButtonFrame)
f:SetScript("OnShow", layout)
f:SetScript("OnHide", layout)
end
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Dominos Changelog

## 10.2.24

* (Retail) Restored the menu, bags and queue status bars

## 10.2.23

* Updated TOC file versions for 10.2.6
Expand Down

0 comments on commit ee83de8

Please sign in to comment.