mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Show corpse distance on reclaim corpse button
When the player is a ghost, the 'Resurrect from Corpse' popup now shows how many yards away the corpse is, updating in real-time as the ghost moves. Distance is only shown when the corpse is on the same map.
This commit is contained in:
parent
355001c236
commit
b2d1edc9db
2 changed files with 16 additions and 0 deletions
|
|
@ -8942,6 +8942,14 @@ void GameScreen::renderReclaimCorpseButton(game::GameHandler& gameHandler) {
|
|||
gameHandler.reclaimCorpse();
|
||||
}
|
||||
ImGui::PopStyleColor(2);
|
||||
float corpDist = gameHandler.getCorpseDistance();
|
||||
if (corpDist >= 0.0f) {
|
||||
char distBuf[48];
|
||||
snprintf(distBuf, sizeof(distBuf), "Corpse: %.0f yards away", corpDist);
|
||||
float dw = ImGui::CalcTextSize(distBuf).x;
|
||||
ImGui::SetCursorPosX((btnW + 16.0f - dw) * 0.5f);
|
||||
ImGui::TextDisabled("%s", distBuf);
|
||||
}
|
||||
}
|
||||
ImGui::End();
|
||||
ImGui::PopStyleColor();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue