Add override notice on Classes tab, include class in profile names
- Show "These settings are currently overridden" and grey out the
frame checkboxes on the Classes tab, but only while viewing the
logged-in character's own class and its active profile has the
override enabled - other classes stay fully editable.
- GetCharacterKey() now embeds the class token ("Name - Class -
Realm"), so auto-created per-character profiles carry it too.
Migrate existing "Name - Realm" profiles/assignments/overrides to
the new key on the affected character's next login.
This commit is contained in:
+26
-1
@@ -104,11 +104,17 @@ classContent:SetPoint("BOTTOMRIGHT", contentBox, "BOTTOMRIGHT", -12, 4)
|
||||
local classLabel = classContent:CreateFontString(nil, "ARTWORK", "GameFontNormalLarge")
|
||||
classLabel:SetPoint("TOPLEFT", classContent, "TOPLEFT", 16, -12)
|
||||
|
||||
local overrideNoticeText = classContent:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
|
||||
overrideNoticeText:SetPoint("TOPLEFT", classLabel, "BOTTOMLEFT", 0, -8)
|
||||
overrideNoticeText:SetTextColor(1, 0.35, 0.35)
|
||||
overrideNoticeText:SetText("These settings are currently overridden")
|
||||
overrideNoticeText:Hide()
|
||||
|
||||
local checks = {}
|
||||
local selectedClass = nil
|
||||
|
||||
local previousAnchor = classLabel
|
||||
local previousSpacing = -20
|
||||
local previousSpacing = -34
|
||||
|
||||
for _, frameName in ipairs(HideCoA.FRAMES) do
|
||||
|
||||
@@ -159,8 +165,27 @@ local function SelectClass(class)
|
||||
classLabel:SetTextColor(1, 1, 1)
|
||||
end
|
||||
|
||||
local _, ownClass = UnitClass("player")
|
||||
local overridden = (class == ownClass) and HideCoA.GetProfileOverride(HideCoA.GetActiveProfileName()).enabled
|
||||
|
||||
if overridden then
|
||||
overrideNoticeText:Show()
|
||||
else
|
||||
overrideNoticeText:Hide()
|
||||
end
|
||||
|
||||
for _, frameName in ipairs(HideCoA.FRAMES) do
|
||||
|
||||
checks[frameName]:SetChecked(HideCoA.GetActiveClassSettings()[class][frameName])
|
||||
|
||||
if overridden then
|
||||
checks[frameName]:Disable()
|
||||
_G[checks[frameName]:GetName() .. "Text"]:SetTextColor(0.5, 0.5, 0.5)
|
||||
else
|
||||
checks[frameName]:Enable()
|
||||
_G[checks[frameName]:GetName() .. "Text"]:SetTextColor(1, 1, 1)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
for tabClass, button in pairs(tabButtons) do
|
||||
|
||||
Reference in New Issue
Block a user