mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-21 21:11:35 +00:00
Implement isMusicPlaying
This commit is contained in:
parent
64db68e0aa
commit
655c4442bc
2 changed files with 8 additions and 0 deletions
|
@ -100,6 +100,8 @@ namespace MWLua
|
|||
sndMgr->streamMusic(std::string(fileName), MWSound::MusicType::Scripted);
|
||||
};
|
||||
|
||||
api["isMusicPlaying"] = []() { return MWBase::Environment::get().getSoundManager()->isMusicPlaying(); };
|
||||
|
||||
api["stopMusic"] = []() { MWBase::Environment::get().getSoundManager()->stopMusic(); };
|
||||
|
||||
return LuaUtil::makeReadOnly(api);
|
||||
|
|
|
@ -83,4 +83,10 @@
|
|||
-- @function [parent=#ambient] stopMusic
|
||||
-- @usage ambient.stopMusic();
|
||||
|
||||
---
|
||||
-- Check if music is playing
|
||||
-- @function [parent=#ambient] isMusicPlaying
|
||||
-- @return #boolean
|
||||
-- @usage local isPlaying = ambient.isMusicPlaying();
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue