feat: add player name tab-completion in chat input

When typing commands like /w, /whisper, /invite, /trade, /duel, /follow,
/inspect, etc., pressing Tab now cycles through matching player names.

Name sources (in priority order):
1. Last whisper sender (most likely target for /r follow-ups)
2. Party/raid members
3. Friends list
4. Nearby visible players

Tab cycles through all matches; single match auto-appends a space.
Complements the existing slash-command tab-completion.
This commit is contained in:
Kelsi 2026-03-21 03:49:02 -07:00
parent 0d49cc8b94
commit 8229a963d1
2 changed files with 106 additions and 1 deletions

View file

@ -62,7 +62,10 @@ private:
// Populated by the SpellCastFailedCallback; queried during action bar button rendering.
std::unordered_map<uint32_t, float> actionFlashEndTimes_;
// Tab-completion state for slash commands
// Cached game handler for input callbacks (set each frame in render)
game::GameHandler* cachedGameHandler_ = nullptr;
// Tab-completion state for slash commands and player names
std::string chatTabPrefix_; // prefix captured on first Tab press
std::vector<std::string> chatTabMatches_; // matching command list
int chatTabMatchIdx_ = -1; // active match index (-1 = inactive)