Logo

index : nswa

WoW addon which removes annoyances and adds QoL (for me)

  • summary
  • about
  • tree
  • log
  • branches
<< path: root/public/nswa.git/html/nswa_hide_cringe.lua blob: 6a761233cef56ea9d17bbd76cd68a0e04e6ba742 [raw] [clear marker]

        
0
1local N = nswa
2local frame = CreateFrame("Frame")
3local hide_tooltips_in_combat = true
4
5
6-- (Patch 12.0.7) - Rogue power bar is not centered
7local function rogue()
8 local x = 20
9 local y = -25
10 local power_bar = PersonalResourceDisplayFrame.ClassFrameContainer
11 power_bar:ClearAllPoints()
12 power_bar:SetPoint("CENTER", power_bar:GetParent(), "CENTER", x, y)
13end
14
15
16
17function N.init_hide_cringe()
18 -- Error/event frames
19 EventToastManagerFrame:SetAlpha(0)
20 UIErrorsFrame:SetAlpha(0)
21
22 -- TODO: Cringe Bug in 12.1.0, is nil!
23 if RaidBossEmoteFrame then
24 print("Debug: RaidBossEmoteFrame not zero!")
25 RaidBossEmoteFrame:SetAlpha(0)
26 end
27
28 -- Loot window after boss
29 GroupLootHistoryFrame:UnregisterAllEvents()
30 GroupLootHistoryFrame:Hide()
31 GroupLootHistoryFrame:SetScript("OnShow", GroupLootHistoryFrame.Hide)
32
33 -- Yap frame
34 hooksecurefunc(TalkingHeadFrame, "PlayCurrent", function(self)
35 self:Hide()
36 end)
37
38 -- Tooltips
39 N.hide_tooltips()
40
41 -- Spell overlays
42 -- Blizzard does a great job displaying overlays that are basically constant active.
43 local HIDDEN = {
44 [1270990] = true, -- Brewmaster talent: harmonic wave, or whatever
45 [1264568] = true, -- DK talent: blood blade, or whatever
46 }
47
48 local original_ShowOverlay = SpellActivationOverlayFrame.ShowOverlay
49
50 SpellActivationOverlayFrame.ShowOverlay = function(self, spellID, ...)
51 if HIDDEN[spellID] then
52 return
53 end
54 return original_ShowOverlay(self, spellID, ...)
55 end
56
57 -- Class related
58 if UnitClassBase("player") == "ROGUE" then
59 rogue()
60 frame:RegisterEvent("UPDATE_STEALTH")
61 frame:RegisterEvent("PLAYER_REGEN_DISABLED")
62 frame:RegisterEvent("PLAYER_REGEN_ENABLED")
63 frame:SetScript("OnEvent", function(self, event) rogue() end)
64 end
65
66 print("Cringe Removed!")
67end
68
69function N.hc_toggle_error()
70 if UIErrorsFrame:GetAlpha() == 0 then
71 print("Showing Error Frame")
72 UIErrorsFrame:SetAlpha(100)
73 else
74 print("Hiding Error Frame")
75 UIErrorsFrame:SetAlpha(0)
76 end
77end
78
79function N.hide_tooltips()
80 local tooltips = {
81 GameTooltip,
82 ItemRefTooltip,
83 ShoppingTooltip1,
84 ShoppingTooltip2,
85 }
86
87 for _, tip in ipairs(tooltips) do
88 tip:HookScript("OnShow", function(self)
89 if hide_tooltips_in_combat and InCombatLockdown() then
90 self:Hide()
91 end
92 end)
93 end
94end
95
96function N.show_tooltips_in_combat()
97 hide_tooltips_in_combat = not hide_tooltips_in_combat
98 if hide_tooltips_in_combat then
99 print("Tooltips hidden in combat")
100 else
101 print("Tooltips shown in combat")
102 end
103end
104
105
Copyright 2026  E766CB298A6D1E64 | Git-Thing heavily inspired by cgit