Adds option to hide the Status Tracking Bar (XP/Rep bar) when at max level, following Dominos' pattern.
From Dominos_Progress/progressBar.lua:
function ProgressBar:GetDisplayConditions()
if self.sets.hideAtMaxLevel then
if UnitLevel("player") == (GetMaxLevelForPlayerExpansion or GetMaxPlayerLevel)() then
return "hide"
end
end
endSimple approach:
- Setting:
hideAtMaxLevel(boolean) - Check:
UnitLevel("player") == GetMaxLevelForPlayerExpansion() - Action: Return "hide" to visibility system
File: utils/uihider.lua (in GetSettings default table, around line 15)
QUICore.db.profile.uiHider = {
-- ... existing settings ...
hideFriendlyNPCNameplates = false,
hideXPBarAtMaxLevel = false, -- NEW: Hide XP/status bar at max level
}File: utils/uihider.lua (add near top, after GetSettings function)
-- Helper: Check if player is at max level
local function IsAtMaxLevel()
local maxLevel = GetMaxLevelForPlayerExpansion and GetMaxLevelForPlayerExpansion()
or GetMaxPlayerLevel and GetMaxPlayerLevel()
or 80
return UnitLevel("player") >= maxLevel
endFile: utils/uihider.lua (in ApplyHideSettings, around line 220)
-- XP/Status Tracking Bar at Max Level
if StatusTrackingBarManager then
local shouldHide = settings.hideXPBarAtMaxLevel and IsAtMaxLevel()
if shouldHide then
StatusTrackingBarManager:Hide()
-- Hook Show() to prevent Blizzard from re-showing it
if not StatusTrackingBarManager._QUI_ShowHooked then
StatusTrackingBarManager._QUI_ShowHooked = true
hooksecurefunc(StatusTrackingBarManager, "Show", function(self)
local s = GetSettings()
if s and s.hideXPBarAtMaxLevel and IsAtMaxLevel() then
self:Hide()
end
end)
end
else
StatusTrackingBarManager:Show()
end
endFile: utils/uihider.lua (update the eventFrame, around line 230)
local eventFrame = CreateFrame("Frame")
eventFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA")
eventFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
eventFrame:RegisterEvent("PLAYER_LEVEL_UP") -- NEW: Check on level up
eventFrame:SetScript("OnEvent", function(self, event, ...)
local settings = GetSettings()
if not settings then return end
-- Existing objective tracker code...
-- XP bar: re-check on level up or entering world
if event == "PLAYER_LEVEL_UP" or event == "PLAYER_ENTERING_WORLD" then
if settings.hideXPBarAtMaxLevel and StatusTrackingBarManager then
if IsAtMaxLevel() then
StatusTrackingBarManager:Hide()
else
StatusTrackingBarManager:Show()
end
end
end
end)File: utils/qui_options.lua (find UI Hider section, add checkbox)
-- Hide XP Bar at Max Level
local hideXPCheck = GUI:CreateFormCheckbox(content, "Hide XP Bar at Max Level",
"hideXPBarAtMaxLevel", uiHider, RefreshUIHider)
hideXPCheck:SetPoint("TOPLEFT", PADDING, y)
hideXPCheck:SetPoint("RIGHT", content, "RIGHT", -PADDING, 0)
y = y - FORM_ROW| Aspect | Implementation |
|---|---|
| Setting | hideXPBarAtMaxLevel in uiHider table |
| Max Level Check | GetMaxLevelForPlayerExpansion() with fallbacks |
| Target Frame | StatusTrackingBarManager |
| Events | PLAYER_LEVEL_UP, PLAYER_ENTERING_WORLD |
| Persistence | Hook Show() to prevent Blizzard re-showing |
When enabled:
- Bar shows normally while leveling
- Automatically hides when you reach max level
- Hides immediately on ding if you're leveling to max