local N = nswa local frame = CreateFrame("Frame") local hide_tooltips_in_combat = true -- (Patch 12.0.7) - Rogue power bar is not centered local function rogue() local x = 20 local y = -25 local power_bar = PersonalResourceDisplayFrame.ClassFrameContainer power_bar:ClearAllPoints() power_bar:SetPoint("CENTER", power_bar:GetParent(), "CENTER", x, y) end function N.init_hide_cringe() -- Error/event frames EventToastManagerFrame:SetAlpha(0) UIErrorsFrame:SetAlpha(0) -- TODO: Cringe Bug in 12.1.0, is nil! if RaidBossEmoteFrame then print("Debug: RaidBossEmoteFrame not zero!") RaidBossEmoteFrame:SetAlpha(0) end -- Loot window after boss GroupLootHistoryFrame:UnregisterAllEvents() GroupLootHistoryFrame:Hide() GroupLootHistoryFrame:SetScript("OnShow", GroupLootHistoryFrame.Hide) -- Yap frame hooksecurefunc(TalkingHeadFrame, "PlayCurrent", function(self) self:Hide() end) -- Tooltips N.hide_tooltips() -- Spell overlays -- Blizzard does a great job displaying overlays that are basically constant active. local HIDDEN = { [1270990] = true, -- Brewmaster talent: harmonic wave, or whatever [1264568] = true, -- DK talent: blood blade, or whatever } local original_ShowOverlay = SpellActivationOverlayFrame.ShowOverlay SpellActivationOverlayFrame.ShowOverlay = function(self, spellID, ...) if HIDDEN[spellID] then return end return original_ShowOverlay(self, spellID, ...) end -- Class related if UnitClassBase("player") == "ROGUE" then rogue() frame:RegisterEvent("UPDATE_STEALTH") frame:RegisterEvent("PLAYER_REGEN_DISABLED") frame:RegisterEvent("PLAYER_REGEN_ENABLED") frame:SetScript("OnEvent", function(self, event) rogue() end) end print("Cringe Removed!") end function N.hc_toggle_error() if UIErrorsFrame:GetAlpha() == 0 then print("Showing Error Frame") UIErrorsFrame:SetAlpha(100) else print("Hiding Error Frame") UIErrorsFrame:SetAlpha(0) end end function N.hide_tooltips() local tooltips = { GameTooltip, ItemRefTooltip, ShoppingTooltip1, ShoppingTooltip2, } for _, tip in ipairs(tooltips) do tip:HookScript("OnShow", function(self) if hide_tooltips_in_combat and InCombatLockdown() then self:Hide() end end) end end function N.show_tooltips_in_combat() hide_tooltips_in_combat = not hide_tooltips_in_combat if hide_tooltips_in_combat then print("Tooltips hidden in combat") else print("Tooltips shown in combat") end end