feat: show whisper toast notification when a player whispers you

Adds a slide-in toast overlay at the bottom-left of the screen whenever
an incoming whisper arrives. Toasts display "Whisper from:", the sender
name in gold, and a truncated message preview. Up to 3 toasts stack with
a 5s lifetime; each fades in over 0.25s and fades out in the final 1s.
This commit is contained in:
Kelsi 2026-03-12 15:53:45 -07:00
parent 77879769d3
commit 5216582f15
2 changed files with 112 additions and 0 deletions

View file

@ -527,6 +527,17 @@ private:
bool areaDiscoveryCallbackSet_ = false;
void renderDiscoveryToast();
// Whisper toast — brief overlay at screen top when a whisper arrives while chat is not focused
struct WhisperToastEntry {
std::string sender;
std::string preview; // first ~60 chars of message
float age = 0.0f;
};
static constexpr float WHISPER_TOAST_DURATION = 5.0f;
std::vector<WhisperToastEntry> whisperToasts_;
size_t whisperSeenCount_ = 0; // how many chat entries have been scanned for whispers
void renderWhisperToasts();
// Zone discovery text ("Entering: <ZoneName>")
static constexpr float ZONE_TEXT_DURATION = 5.0f;
float zoneTextTimer_ = 0.0f;