Skip to content

Nameplates: add Border hover style + class-color option#370

Open
Trenchfoote wants to merge 2 commits into
EllesmereGaming:mainfrom
Trenchfoote:feat/nameplate-hover-style
Open

Nameplates: add Border hover style + class-color option#370
Trenchfoote wants to merge 2 commits into
EllesmereGaming:mainfrom
Trenchfoote:feat/nameplate-hover-style

Conversation

@Trenchfoote

Copy link
Copy Markdown
Contributor

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.

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>
Copilot AI review requested due to automatic review settings June 7, 2026 07:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 hoverStyle and 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>
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.

2 participants