mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Parse SMSG_ENVIRONMENTAL_DAMAGE_LOG and color nameplate names by hostility
- Implement SMSG_ENVIRONMENTAL_DAMAGE_LOG: show fall/lava/fire/drowning damage as ENVIRONMENTAL combat text (orange -N) for the local player - Color nameplate unit names: hostile units red, non-hostile yellow (matches WoW's standard red=enemy / yellow=neutral convention)
This commit is contained in:
parent
18a3a0fd01
commit
70dcb6ef43
2 changed files with 19 additions and 2 deletions
|
|
@ -4637,8 +4637,12 @@ void GameScreen::renderNameplates(game::GameHandler& gameHandler) {
|
|||
ImVec2 textSize = ImGui::CalcTextSize(labelBuf);
|
||||
float nameX = sx - textSize.x * 0.5f;
|
||||
float nameY = sy - barH - 12.0f;
|
||||
// Name color: hostile=red, non-hostile=yellow (WoW convention)
|
||||
ImU32 nameColor = unit->isHostile()
|
||||
? IM_COL32(220, 80, 80, A(230))
|
||||
: IM_COL32(240, 200, 100, A(230));
|
||||
drawList->AddText(ImVec2(nameX + 1.0f, nameY + 1.0f), IM_COL32(0, 0, 0, A(160)), labelBuf);
|
||||
drawList->AddText(ImVec2(nameX, nameY), IM_COL32(255, 255, 255, A(220)), labelBuf);
|
||||
drawList->AddText(ImVec2(nameX, nameY), nameColor, labelBuf);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue