Skip to content

Expose a public unit-to-frame accessor for raid frames - #1794

Open
dfrisone wants to merge 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/raidframe-unit-accessor-clean
Open

Expose a public unit-to-frame accessor for raid frames#1794
dfrisone wants to merge 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/raidframe-unit-accessor-clean

Conversation

@dfrisone

Copy link
Copy Markdown
Contributor
Adds `EllesmereUI.RaidFrames_GetFrameForUnit(unit)`, a small public accessor
that returns the actual button for a given unit token on our own raid
frames.

Context: EllesmereUIRaidFrames keeps its unit->button map (`unitToButton`,
`ns._partyUnitToButton`) private -- every existing reader is an internal
event handler in this same file. A companion addon (NaowhUI_SmartReminders,
part of the same suite) wants to highlight a specific raider's raid-frame
button for a new "raid-frame glow" reminder type, and needs a way to find
that button without reaching into this file's own locals.

The new function is a one-line combined lookup, the same shape every
internal reader in this file already uses (`unitToButton[unit] or
ns._partyUnitToButton[unit]`). No existing behavior changes -- purely
additive, zero cost unless called.

EllesmereUI.RaidFrames_GetFrameForUnit(unit) -- unitToButton/
ns._partyUnitToButton stayed private otherwise, every existing reader is
an internal event handler in this same file. NaowhUI_SmartReminders'
raid-frame glow reminder needs a way to find the actual button for a
unit without reaching into this file's own locals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant