Feat/class color background#367
Open
Trenchfoote wants to merge 2 commits into
Open
Conversation
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 class-colored background option for unit/raid health bars, updates theme and preview logic to respect it, and improves range-alpha behavior in options.
Changes:
- Added
bgClassColoredsetting defaults for unit frames and raid frames. - Updated health bar background rendering (live + preview) to optionally use class color for the background.
- Fixed raid-frame OOR alpha to respect party-specific scaling and made the OOR alpha slider apply immediately.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| EllesmereUIUnitFrames/EllesmereUIUnitFrames.lua | Adds bgClassColored defaults and applies class-colored background logic in dark theme updates. |
| EllesmereUIUnitFrames/EUI_UnitFrames_Options.lua | Extends options UI/preview to toggle class-colored background and sync settings across units. |
| EllesmereUIRaidFrames/EllesmereUIRaidFrames.lua | Adds bgClassColored defaults, introduces ns.GetBgColor, updates background anchoring and OOR alpha source. |
| EllesmereUIRaidFrames/EUI_RaidFrames_Options.lua | Adds UI toggles for class-colored background and makes OOR alpha slider reapply immediately. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1120
to
+1125
| local u = unit or self.unit or uKey | ||
| if u then | ||
| local _, ct = UnitClass(u) | ||
| local cc = ct and EllesmereUI.GetClassColor(ct) | ||
| if cc then bgClassR, bgClassG, bgClassB = cc.r, cc.g, cc.b end | ||
| end |
Comment on lines
+1152
to
+1157
| local u = unitKey or (health.__owner and health.__owner.unit) | ||
| if u then | ||
| local _, ct = UnitClass(u) | ||
| local cc = ct and EllesmereUI.GetClassColor(ct) | ||
| if cc then bgClassR, bgClassG, bgClassB = cc.r, cc.g, cc.b end | ||
| end |
Comment on lines
+4498
to
+4506
| bgSw._eabOrigClick = bgSw:GetScript("OnClick") | ||
| bgSw:SetScript("OnClick", function(self) | ||
| if SVal("bgClassColored", false) then | ||
| SSet("bgClassColored", false) | ||
| ReloadAndUpdate(); UpdatePreview(); EllesmereUI:RefreshPage() | ||
| return | ||
| end | ||
| if self._eabOrigClick then self._eabOrigClick(self) end | ||
| end) |
Comment on lines
+4465
to
+4467
| SSet("bgClassColored", true) | ||
| ReloadAndUpdate(); UpdatePreview(); EllesmereUI:RefreshPage() | ||
| end) |
Comment on lines
+629
to
+637
| bgSwatch._eabOrigClick = bgSwatch:GetScript("OnClick") | ||
| bgSwatch:SetScript("OnClick", function(self) | ||
| if SVal("bgClassColored", false) then | ||
| SSet("bgClassColored", false) | ||
| ReloadAndUpdate(); EllesmereUI:RefreshPage() | ||
| return | ||
| end | ||
| if self._eabOrigClick then self._eabOrigClick(self) end | ||
| end) |
Adds a class-color option for the health bar *background*, mirroring the existing class-color option for the health bar fill. A Custom/Class swatch pair on the Background control toggles bgClassColored; clicking either dims the inactive one (same pattern as the fill picker). - New GetBgColor(unit, s) resolves the bg to the unit's class color when bgClassColored is set, else the custom bg color, at bgDarkness alpha. The class path is secret-safe (guards a secret classToken from out-of-range/ uninspectable units before the GetClassColor table index). - Applied in live frames, ReloadFrames, and both config previews. - Depends on the missing-health-portion bg anchoring; with class colors the bg now reveals as health drops (instead of a full bright backing that would bleed through the fill). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
d8da645 to
4f6e0f8
Compare
Out-of-range/uninspectable units can return a secret class token from UnitClass; mirror the RaidFrames guard so GetClassColor is only called on a real token. Addresses Copilot review on the class-color bg picker. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
95b2260 to
511beeb
Compare
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.
No description provided.