UnitFrames: add Mouseover option for Blizzard Aura Frames - #1169
Open
Trenchfoote wants to merge 1 commit into
Open
UnitFrames: add Mouseover option for Blizzard Aura Frames#1169Trenchfoote wants to merge 1 commit into
Trenchfoote wants to merge 1 commit into
Conversation
Adds a Mouseover toggle to the Player Buffs & Debuffs options. When on, BuffFrame and DebuffFrame stay hidden and each reveals only while the cursor is over its icons. Buffs and debuffs are independent, so hovering one does not reveal the other. Driven by the aura buttons' own OnEnter/OnLeave rather than a ticker: an alpha-0 frame still receives mouse input, so the buttons keep their tooltips and keep firing while invisible. The fade-out defers one frame and then re-tests which button is hovered, so sliding between icons does not flicker. Hover is tested against the buttons and never the parent frame, whose rect extends well beyond the visible icons. Nothing is created until the setting is first enabled: no frame, no event registration, no hooks. Defaults off, applies live with no reload, and works whether or not the styled-aura skin is enabled.
There was a problem hiding this comment.
Pull request overview
Adds a new “Mouseover” behavior for Blizzard’s BuffFrame/DebuffFrame within the UnitFrames module, exposing it as an option in the Unit Frames UI and implementing the runtime fade/show logic in the PlayerAuras module.
Changes:
- Adds a new “Mouseover” toggle to the Player Buffs & Debuffs options UI and wires it into the existing playerAuras option setter.
- Implements mouseover-driven alpha fading for BuffFrame/DebuffFrame by hooking aura buttons’ OnEnter/OnLeave and sweeping for newly created buttons via UNIT_AURA.
- Applies the mouseover behavior during PLAYER_LOGIN initialization (before the styled-skin enable gate).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| EllesmereUIUnitFrames/EUI_UnitFrames_Options.lua | Adds a “Mouseover” toggle row for Blizzard aura frames and triggers the mouseover apply function on option updates. |
| EllesmereUIUnitFrames/EllesmereUIUnitFrames_PlayerAuras.lua | Implements the mouseover fade/sweep logic and applies it during module initialization. |
Suppressed comments (1)
EllesmereUIUnitFrames/EllesmereUIUnitFrames_PlayerAuras.lua:480
- Mouseover hooking/sweeping is only driven by player UNIT_AURA, but elsewhere in this module Edit Mode preview is called out as a button-birth path without a UNIT_AURA. If the user opens Edit Mode after enabling Mouseover, the preview buttons can be unhooked and the frame alpha may not be re-settled until the next aura change. Consider queuing a sweep when Edit Mode opens (the handler already bails when mouseover is off).
if not _moEvt then
_moEvt = CreateFrame("Frame")
_moEvt:SetScript("OnEvent", MO_QueueSweep)
end
_moEvt:RegisterUnitEvent("UNIT_AURA", "player")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+447
to
+449
| -- Buttons are only born from aura-list changes, so one deferred sweep per | ||
| -- player UNIT_AURA catches every new button. Already-hooked buttons are skipped | ||
| -- on the ffd flag, so the steady-state sweep walks a short list and does nothing. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Adds a "Mouseover" toggle to Unit Frames -> Blizzard Aura Frames (Player Buffs &
Debuffs). When enabled, the buff and debuff frames stay hidden and each one
reveals only while the cursor is over its icons. Buffs and debuffs are
independent, so hovering one does not reveal the other.
Defaults off, applies live with no reload, and works whether or not the
styled-aura skin ("Enable Styled Buffs & Debuffs") is turned on -- which is why
the toggle sits outside that section gate.
How was it tested?
Tested in game on both clients -- live retail (12.0) and the 12.1 PTR. Same addon
build on each.
Toggled on/off: frames hide, reveal per-frame on hover, tooltips still work while
faded, and both return to full alpha when the setting is turned off. No load
errors on either client.
Screenshots
Adding before/after shortly.
Checklist
HookScript/hooksecurefunconly, neverSetScripton Blizzard framesNotes for review
Driven by the aura buttons' own
OnEnter/OnLeaverather than a ticker: analpha-0 frame still receives mouse input, so the buttons keep their tooltips and
keep firing while invisible. The fade-out defers one frame and re-tests which
button is hovered, so sliding between icons does not flicker.
Hover is tested against the buttons, never the parent frame --
BuffFrame's rectextends well past the visible icons (Edit Mode region, expand button,
consolidation frame), so
frame:IsMouseOver()stays true long after the cursorhas left the auras.
Nothing exists until first enable: no frame, no event registration, no hooks.
Buttons are hooked on a deferred sweep off player
UNIT_AURA, skippingalready-hooked buttons via the
ffdweak table.Touches the player aura frames but adds no
IS_121branch -- it uses the sameframe.auraFrames/AuraContaineraccessors the existing skin path alreadyuses ungated. Flagging it in case you want that gated differently.