mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +00:00
feat: show guild name on target frame for players
Display <GuildName> below the player name in the target frame, using the same guild name cache as nameplates.
This commit is contained in:
parent
e572cdfb4a
commit
6aea48aea9
1 changed files with 11 additions and 0 deletions
|
|
@ -4182,6 +4182,17 @@ void GameScreen::renderTargetFrame(game::GameHandler& gameHandler) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Player guild name (e.g. "<My Guild>") — mirrors NPC subtitle styling
|
||||||
|
if (target->getType() == game::ObjectType::PLAYER) {
|
||||||
|
uint32_t guildId = gameHandler.getEntityGuildId(target->getGuid());
|
||||||
|
if (guildId != 0) {
|
||||||
|
const std::string& gn = gameHandler.lookupGuildName(guildId);
|
||||||
|
if (!gn.empty()) {
|
||||||
|
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 0.9f), "<%s>", gn.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Right-click context menu on the target name
|
// Right-click context menu on the target name
|
||||||
if (ImGui::BeginPopupContextItem("##TargetNameCtx")) {
|
if (ImGui::BeginPopupContextItem("##TargetNameCtx")) {
|
||||||
const bool isPlayer = (target->getType() == game::ObjectType::PLAYER);
|
const bool isPlayer = (target->getType() == game::ObjectType::PLAYER);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue