Fix tooltip drag hint, force-show crash, and Class Resources tab layout

Replace the "Drag to move" tooltip hint on class resource frames instead
of removing it wholesale, so text sharing the same line (e.g. "Right-click
for options") survives; match by substring rather than exact text and scope
by IsMouseOver since GameTooltip's owner can be a child region.

Guard against force-showing a class resource frame the game has never
naturally displayed: its underlying data (powerType, maxValue, ...) is
never populated for a class that doesn't use it, and forcing Show() on it
renders as a garbage white bar texture. Same fix as HideCoAUI's
seenNaturalShow guard.

Rename the Class Resources tab's checkboxes to the frames' actual global
names, stack them vertically, and add Hide All / Show All buttons below them.
This commit is contained in:
2026-07-16 15:46:55 +02:00
parent 50824cc0e1
commit bf9972e624
2 changed files with 94 additions and 5 deletions
+38 -4
View File
@@ -69,7 +69,8 @@ local function getOptions()
hideResourceSegmentBar = {
order = 3,
type = "toggle",
name = "Hide Resource Segment Bar",
name = "Hide CoAResourceSegmentBar",
width = "full",
get = function() return CoA.db.profile.hideResourceSegmentBar end,
set = function(_, value)
CoA.db.profile.hideResourceSegmentBar = value
@@ -82,7 +83,8 @@ local function getOptions()
hideResourceOrb = {
order = 4,
type = "toggle",
name = "Hide Resource Orb",
name = "Hide CoAResourceOrb",
width = "full",
get = function() return CoA.db.profile.hideResourceOrb end,
set = function(_, value)
CoA.db.profile.hideResourceOrb = value
@@ -95,7 +97,8 @@ local function getOptions()
hideResourceBar = {
order = 5,
type = "toggle",
name = "Hide Resource Bar",
name = "Hide CoAResourceBar",
width = "full",
get = function() return CoA.db.profile.hideResourceBar end,
set = function(_, value)
CoA.db.profile.hideResourceBar = value
@@ -108,11 +111,42 @@ local function getOptions()
hideMultiCastActionBar = {
order = 6,
type = "toggle",
name = "Hide Multi Cast Action Bar",
name = "Hide CoAMultiCastActionBarFrame",
width = "full",
get = function() return CoA.db.profile.hideMultiCastActionBar end,
set = function(_, value)
CoA.db.profile.hideMultiCastActionBar = value
if CoA.UpdateClassResourceVisibility then
CoA:UpdateClassResourceVisibility()
end
end,
},
hideAll = {
order = 7,
type = "execute",
name = "Hide All",
func = function()
CoA.db.profile.hideResourceSegmentBar = true
CoA.db.profile.hideResourceOrb = true
CoA.db.profile.hideResourceBar = true
CoA.db.profile.hideMultiCastActionBar = true
if CoA.UpdateClassResourceVisibility then
CoA:UpdateClassResourceVisibility()
end
end,
},
showAll = {
order = 8,
type = "execute",
name = "Show All",
func = function()
CoA.db.profile.hideResourceSegmentBar = false
CoA.db.profile.hideResourceOrb = false
CoA.db.profile.hideResourceBar = false
CoA.db.profile.hideMultiCastActionBar = false
if CoA.UpdateClassResourceVisibility then
CoA:UpdateClassResourceVisibility()
end