mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
77879769d3
commit
5216582f15
2 changed files with 112 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue