Nameplates: add Border hover style + class-color option#370
Open
Trenchfoote wants to merge 2 commits into
Open
Nameplates: add Border hover style + class-color option#370Trenchfoote wants to merge 2 commits into
Trenchfoote wants to merge 2 commits into
Conversation
Extends the mouseover hover effect with a style choice and a class-color border, for enemy and friendly plates. - New "Hover Style" dropdown: Health Bar Highlight (the existing bar-fill overlay) or Border (a pixel-perfect border around the plate). All show/hide sites route through a shared ns.ShowPlateHover(plate, shown) so the two elements never both show, and a style switch applies without a reload. - The Hover Style cog is context-sensitive: Highlight exposes Opacity + Color (the former standalone "Hover Effect" controls, now consolidated); Border exposes Thickness + Color + Class Color. - Class Color border uses the player's own class color (dims the custom Color picker while active); resolved at show time so it survives plate recycling. RefreshHoverEffect applies changes live. - New DB keys (hoverStyle, hoverBorderSize, hoverBorderColor, hoverBorderClassColored) with defaults and per-profile sync. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a configurable mouseover hover style for nameplates (highlight fill vs border), and routes hover show/hide through a single helper so enemy and friendly plates behave consistently.
Changes:
- Introduces
hoverStyleand hover-border settings in defaults + preset keys. - Adds hover-border frame creation on both enemy and friendly plates and centralizes hover toggling in
ns.ShowPlateHover. - Updates the options UI to select hover style and configure either highlight or border via a context-sensitive cog popup.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| EllesmereUINameplates/EllesmereUINameplatesFriendly.lua | Adds hover-border overlay creation and switches mouseover/clear logic to ns.ShowPlateHover. |
| EllesmereUINameplates/EllesmereUINameplates.lua | Adds new hover defaults, creates hover-border overlay on enemy plates, and implements ns.ShowPlateHover + refresh logic. |
| EllesmereUINameplates/EUI_Nameplates_Options.lua | Replaces “Hover Effect” slider with “Hover Style” dropdown and adds popups for style-specific settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2101
to
+2119
| function ns.ShowPlateHover(plate, shown) | ||
| if not plate then return end | ||
| local style = (p and p.hoverStyle) or defaults.hoverStyle | ||
| if style == "border" then | ||
| if plate.highlight then plate.highlight:Hide() end | ||
| if plate.hoverBorder then | ||
| -- Resolve color at show time so a class-colored border picks up the | ||
| -- plate's current unit (which changes as plates recycle). | ||
| if shown and PP and PP.SetBorderColor then | ||
| local hr, hg, hb = HoverBorderRGB() | ||
| PP.SetBorderColor(plate.hoverBorder, hr, hg, hb, 1) | ||
| end | ||
| plate.hoverBorder:SetShown(shown and true or false) | ||
| end | ||
| else | ||
| if plate.hoverBorder then plate.hoverBorder:Hide() end | ||
| if plate.highlight then plate.highlight:SetShown(shown and true or false) end | ||
| end | ||
| end |
Comment on lines
+2107
to
+2108
| -- Resolve color at show time so a class-colored border picks up the | ||
| -- plate's current unit (which changes as plates recycle). |
Comment on lines
+653
to
+664
| -- Hover border (alternative hover style), mirrors the enemy plate setup. | ||
| local _PP = EllesmereUI and EllesmereUI.PP | ||
| if _PP and _PP.CreateBorder then | ||
| local hbFrame = CreateFrame("Frame", nil, plate.health) | ||
| hbFrame:SetAllPoints(plate.health) | ||
| hbFrame:SetFrameLevel(plate.health:GetFrameLevel() + 2) | ||
| local _hbc = (FP() and FP().hoverBorderColor) or ns.defaults.hoverBorderColor | ||
| local _hbs = (FP() and FP().hoverBorderSize) or ns.defaults.hoverBorderSize | ||
| _PP.CreateBorder(hbFrame, _hbc.r, _hbc.g, _hbc.b, 1, _hbs, "OVERLAY", 7) | ||
| hbFrame:Hide() | ||
| plate.hoverBorder = hbFrame | ||
| end |
The hover border resolves to PLAYER_CLASS (the player's own class), not the plate's unit; rewrite the comment to reflect that the show-time resolve picks up setting changes. Addresses Copilot review on the nameplate hover style. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Extends the mouseover hover effect with a style choice and a class-color border, for enemy and friendly plates.