mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
feat: apply class colors to focus frame player name
Player entities shown in the focus frame now display their canonical WoW class color (from UNIT_FIELD_BYTES_0), consistent with how player names are now colored in the target frame, party frame, raid frame, and nameplates.
This commit is contained in:
parent
c73da1629b
commit
f4a31fef2a
1 changed files with 3 additions and 1 deletions
|
|
@ -3486,7 +3486,9 @@ void GameScreen::renderFocusFrame(game::GameHandler& gameHandler) {
|
|||
// Determine color based on relation (same logic as target frame)
|
||||
ImVec4 focusColor(0.7f, 0.7f, 0.7f, 1.0f);
|
||||
if (focus->getType() == game::ObjectType::PLAYER) {
|
||||
focusColor = ImVec4(0.3f, 1.0f, 0.3f, 1.0f);
|
||||
// Use class color for player focus targets
|
||||
uint8_t cid = entityClassId(focus.get());
|
||||
focusColor = (cid != 0) ? classColorVec4(cid) : ImVec4(0.3f, 1.0f, 0.3f, 1.0f);
|
||||
} else if (focus->getType() == game::ObjectType::UNIT) {
|
||||
auto u = std::static_pointer_cast<game::Unit>(focus);
|
||||
if (u->getHealth() == 0 && u->getMaxHealth() > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue