mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Add UIErrorsFrame: center-bottom spell error overlay with fade-out
This commit is contained in:
parent
955b22841e
commit
25e2c60603
4 changed files with 92 additions and 2 deletions
|
|
@ -1269,6 +1269,11 @@ public:
|
|||
using PlayPositionalSoundCallback = std::function<void(uint32_t soundId, uint64_t sourceGuid)>;
|
||||
void setPlayPositionalSoundCallback(PlayPositionalSoundCallback cb) { playPositionalSoundCallback_ = std::move(cb); }
|
||||
|
||||
// UI error frame: prominent on-screen error messages (spell can't be cast, etc.)
|
||||
using UIErrorCallback = std::function<void(const std::string& msg)>;
|
||||
void setUIErrorCallback(UIErrorCallback cb) { uiErrorCallback_ = std::move(cb); }
|
||||
void addUIError(const std::string& msg) { if (uiErrorCallback_) uiErrorCallback_(msg); }
|
||||
|
||||
// Mount state
|
||||
using MountCallback = std::function<void(uint32_t mountDisplayId)>; // 0 = dismount
|
||||
void setMountCallback(MountCallback cb) { mountCallback_ = std::move(cb); }
|
||||
|
|
@ -2548,6 +2553,9 @@ private:
|
|||
PlayMusicCallback playMusicCallback_;
|
||||
PlaySoundCallback playSoundCallback_;
|
||||
PlayPositionalSoundCallback playPositionalSoundCallback_;
|
||||
|
||||
// ---- UI error frame callback ----
|
||||
UIErrorCallback uiErrorCallback_;
|
||||
};
|
||||
|
||||
} // namespace game
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue