Add V key toggle for nameplates (WoW default binding)

nameplates default to visible; pressing V in the game world toggles them
off/on while the keyboard is not captured by a UI element.
This commit is contained in:
Kelsi 2026-03-09 17:03:06 -07:00
parent 01e0c2f9a3
commit 9d26f8c29e
2 changed files with 7 additions and 1 deletions

View file

@ -62,6 +62,7 @@ private:
// UI state
bool showEntityWindow = false;
bool showChatWindow = true;
bool showNameplates_ = true; // V key toggles nameplates
bool showPlayerInfo = false;
bool showGuildRoster_ = false;
std::string selectedGuildMember_;

View file

@ -395,7 +395,7 @@ void GameScreen::render(game::GameHandler& gameHandler) {
renderCastBar(gameHandler);
renderMirrorTimers(gameHandler);
renderQuestObjectiveTracker(gameHandler);
renderNameplates(gameHandler);
if (showNameplates_) renderNameplates(gameHandler);
renderCombatText(gameHandler);
renderPartyFrames(gameHandler);
renderGroupInvitePopup(gameHandler);
@ -1397,6 +1397,11 @@ void GameScreen::processTargetInput(game::GameHandler& gameHandler) {
}
}
// V — toggle nameplates (WoW default keybinding)
if (input.isKeyJustPressed(SDL_SCANCODE_V)) {
showNameplates_ = !showNameplates_;
}
// Action bar keys (1-9, 0, -, =)
static const SDL_Scancode actionBarKeys[] = {
SDL_SCANCODE_1, SDL_SCANCODE_2, SDL_SCANCODE_3, SDL_SCANCODE_4,