mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
Add mute button and original soundtrack toggle
- Mute button: small [M] button alongside minimap zoom controls, turns red when active; directly sets AudioEngine master volume to 0, restores on unmute; persists in settings.cfg - Original Soundtrack: checkbox in Settings > Audio that controls whether custom original music tracks (file: prefix) are included in zone music rotation; when disabled, only WoW MPQ tracks play; persists in settings.cfg - ZoneManager.getRandomMusic() now filters file: paths when OST is disabled, falling back to full list if zone has no non-file tracks
This commit is contained in:
parent
d9bbc52d03
commit
925f9f0214
5 changed files with 91 additions and 13 deletions
|
|
@ -23,11 +23,16 @@ public:
|
|||
std::string getRandomMusic(uint32_t zoneId);
|
||||
std::vector<std::string> getAllMusicPaths() const;
|
||||
|
||||
// When false, file: (original soundtrack) tracks are excluded from the pool
|
||||
void setUseOriginalSoundtrack(bool use) { useOriginalSoundtrack_ = use; }
|
||||
bool getUseOriginalSoundtrack() const { return useOriginalSoundtrack_; }
|
||||
|
||||
private:
|
||||
// tile key = tileX * 100 + tileY
|
||||
std::unordered_map<int, uint32_t> tileToZone;
|
||||
std::unordered_map<uint32_t, ZoneInfo> zones;
|
||||
std::string lastPlayedMusic_;
|
||||
bool useOriginalSoundtrack_ = true;
|
||||
};
|
||||
|
||||
} // namespace game
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ public:
|
|||
double getLastWMORenderMs() const { return lastWMORenderMs; }
|
||||
double getLastM2RenderMs() const { return lastM2RenderMs; }
|
||||
audio::MusicManager* getMusicManager() { return musicManager.get(); }
|
||||
game::ZoneManager* getZoneManager() { return zoneManager.get(); }
|
||||
audio::FootstepManager* getFootstepManager() { return footstepManager.get(); }
|
||||
audio::ActivitySoundManager* getActivitySoundManager() { return activitySoundManager.get(); }
|
||||
audio::MountSoundManager* getMountSoundManager() { return mountSoundManager.get(); }
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ private:
|
|||
bool pendingMinimapRotate = false;
|
||||
bool pendingMinimapSquare = false;
|
||||
bool pendingSeparateBags = true;
|
||||
bool pendingUseOriginalSoundtrack = true;
|
||||
|
||||
// UI element transparency (0.0 = fully transparent, 1.0 = fully opaque)
|
||||
float uiOpacity_ = 0.65f;
|
||||
|
|
@ -104,6 +105,10 @@ private:
|
|||
bool minimapSquare_ = false;
|
||||
bool minimapSettingsApplied_ = false;
|
||||
|
||||
// Mute state: mute bypasses master volume without touching slider values
|
||||
bool soundMuted_ = false;
|
||||
float preMuteVolume_ = 1.0f; // AudioEngine master volume before muting
|
||||
|
||||
/**
|
||||
* Render player info window
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue