mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
mouse click sounds
This commit is contained in:
parent
c0f27bd5ef
commit
b1a394552d
1 changed files with 12 additions and 0 deletions
|
@ -13,6 +13,8 @@
|
|||
|
||||
#include <MyGUI_InputManager.h>
|
||||
#include <MyGUI_RenderManager.h>
|
||||
#include <MyGUI_Widget.h>
|
||||
#include <MyGUI_Button.h>
|
||||
|
||||
#include <openengine/ogre/renderer.hpp>
|
||||
|
||||
|
@ -21,6 +23,7 @@
|
|||
#include "../mwworld/player.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
#include "../mwbase/soundmanager.hpp"
|
||||
|
||||
namespace MWInput
|
||||
{
|
||||
|
@ -442,6 +445,15 @@ namespace MWInput
|
|||
|
||||
MyGUI::InputManager::getInstance().injectMousePress(mMouseX, mMouseY, MyGUI::MouseButton::Enum(id));
|
||||
|
||||
if (MyGUI::InputManager::getInstance ().getMouseFocusWidget () != 0)
|
||||
{
|
||||
MyGUI::Button* b = MyGUI::InputManager::getInstance ().getMouseFocusWidget ()->castType<MyGUI::Button>(false);
|
||||
if (b)
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager ()->playSound ("Menu Click", 1.f, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue