feat: show quality-coloured loot toast when items are received

SMSG_ITEM_PUSH_RESULT now fires a new ItemLootCallback that
game_screen.cpp uses to push a compact slide-in toast at the
bottom-left of the screen.  Each toast:

- Shows a quality-tinted left accent bar (grey/white/green/blue/
  purple/orange matching WoW quality colours)
- Displays "Loot: <item name>" with the name in quality colour
- Appends " x<N>" for stacked pickups
- Coalesces repeated pickups of the same item (adds count, resets timer)
- Stacks up to 5 entries, 3 s lifetime with 0.15 s slide-in and 0.7 s
  fade-out
This commit is contained in:
Kelsi 2026-03-12 16:24:11 -07:00
parent 129fa84fe3
commit 42d66bc876
4 changed files with 132 additions and 0 deletions

View file

@ -574,6 +574,19 @@ private:
bool pvpHonorCallbackSet_ = false;
void renderPvpHonorToasts();
// Item loot toast — quality-coloured popup when an item is received
struct ItemLootToastEntry {
uint32_t itemId = 0;
uint32_t count = 0;
uint32_t quality = 1; // 0=grey,1=white,2=green,3=blue,4=purple,5=orange
std::string name;
float age = 0.0f;
};
static constexpr float ITEM_LOOT_TOAST_DURATION = 3.0f;
std::vector<ItemLootToastEntry> itemLootToasts_;
bool itemLootCallbackSet_ = false;
void renderItemLootToasts();
// Zone discovery text ("Entering: <ZoneName>")
static constexpr float ZONE_TEXT_DURATION = 5.0f;
float zoneTextTimer_ = 0.0f;