Repository navigation
Expand file tree
/
Copy pathActionBars.lua
More file actions
118 lines (107 loc) · 5.01 KB
/
Copy pathActionBars.lua
File metadata and controls
118 lines (107 loc) · 5.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
-------------------------------------------------------------------------------
-- BlackwellUI for Azeroth Survivors - ActionBars.lua
-- Copyright (c) 2026 Pierre (Blackwellcode). All rights reserved. See LICENSE.
-- Clean suppression of Blizzard action bars, bags, and micro menu.
-- In Azeroth Survivors spells auto-cast; action bars & bags are not used.
-- Uses hidden-parent reparenting (standard 1.12 foolproof suppression).
-- Lua 5.0 / WoW 1.12.1: no '#', no '%', no string methods.
-------------------------------------------------------------------------------
local B = BlackwellUI
local mod = {}
mod.label = "Action Bars"
mod.toggleLabel = "Hide action bars and bags"
mod.hint = "Spells cast themselves in Azeroth Survivors. Needs /reload to bring them back."
mod.alwaysActive = false
-- Reparents Blizzard frames to a hidden sink; turning it off takes a /reload.
mod.reloadOnToggle = true
-- Hides Blizzard frames only: no own frame for scale / opacity / visibility.
mod.noLook = true
-- Hidden sink frame: anything parented here is permanently invisible
local hiddenSink = CreateFrame("Frame", "BUI_HiddenSink", UIParent)
hiddenSink:Hide()
function mod:HideBlizzardArt()
-- Reparent and hide MainMenuBar (contains action buttons, bags, micro-buttons, exp bar, end-caps)
if MainMenuBar then
MainMenuBar:SetParent(hiddenSink)
MainMenuBar:ClearAllPoints()
MainMenuBar:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 1000, 1000)
MainMenuBar:Hide()
MainMenuBar:SetScript("OnShow", function() this:Hide() end)
end
-- Reparent and hide BonusActionBarFrame (stances/stealth bar)
if BonusActionBarFrame then
if type(BonusActionBarFrame.SetParent) == "function" then BonusActionBarFrame:SetParent(hiddenSink) end
if type(BonusActionBarFrame.ClearAllPoints) == "function" then BonusActionBarFrame:ClearAllPoints() end
if type(BonusActionBarFrame.SetPoint) == "function" then BonusActionBarFrame:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 1000, 1000) end
if type(BonusActionBarFrame.Hide) == "function" then BonusActionBarFrame:Hide() end
if type(BonusActionBarFrame.SetScript) == "function" then BonusActionBarFrame:SetScript("OnShow", function() this:Hide() end) end
end
-- Reparent and hide bags & micro menu individually if detached
local framesToSink = {
MainMenuBarArtFrame,
MainMenuBarOverlayFrame,
MainMenuBarPerformanceBarFrame,
MainMenuBarPerformanceBar,
MainMenuExpBar,
ExhaustionTick,
CharacterBag0Slot,
CharacterBag1Slot,
CharacterBag2Slot,
CharacterBag3Slot,
MainMenuBarBackpackButton,
KeyRingButton,
CharacterMicroButton,
SpellbookMicroButton,
TalentMicroButton,
QuestLogMicroButton,
SocialsMicroButton,
WorldMapMicroButton,
MainMenuMicroButton,
HelpMicroButton,
ShapeshiftBarFrame,
PetActionBarFrame,
ReputationWatchBar,
}
for i = 1, table.getn(framesToSink) do
local f = framesToSink[i]
if f then
if type(f.SetParent) == "function" then f:SetParent(hiddenSink) end
if type(f.ClearAllPoints) == "function" then f:ClearAllPoints() end
if type(f.SetPoint) == "function" then f:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 1000, 1000) end
if type(f.Hide) == "function" then f:Hide() end
if type(f.SetScript) == "function" then f:SetScript("OnShow", function() this:Hide() end) end
end
end
for i = 1, 12 do
local ab = getglobal("ActionButton" .. i)
if ab then
if type(ab.SetParent) == "function" then ab:SetParent(hiddenSink) end
if type(ab.ClearAllPoints) == "function" then ab:ClearAllPoints() end
if type(ab.SetPoint) == "function" then ab:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 1000, 1000) end
if type(ab.Hide) == "function" then ab:Hide() end
if type(ab.SetScript) == "function" then ab:SetScript("OnShow", function() this:Hide() end) end
end
local bab = getglobal("BonusActionButton" .. i)
if bab then
if type(bab.SetParent) == "function" then bab:SetParent(hiddenSink) end
if type(bab.ClearAllPoints) == "function" then bab:ClearAllPoints() end
if type(bab.SetPoint) == "function" then bab:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 1000, 1000) end
if type(bab.Hide) == "function" then bab:Hide() end
if type(bab.SetScript) == "function" then bab:SetScript("OnShow", function() this:Hide() end) end
end
end
end
-- Suppress Blizzard art immediately on event
local suppressor = CreateFrame("Frame")
suppressor:RegisterEvent("PLAYER_ENTERING_WORLD")
suppressor:SetScript("OnEvent", function()
if B.db and B:IsEnabled("actionbars") then
mod:HideBlizzardArt()
end
end)
function mod:Create()
self:HideBlizzardArt()
end
function mod:Update(state)
end
B:RegisterModule("actionbars", mod)