1 #include "EventManager.h"
4 using namespace awful::gui::game
;
6 Pointer
< EventManager
> EventManager::ms_pInstance
;
8 Pointer
< EventManager
> EventManager::GetInstance()
11 ms_pInstance
= new EventManager
;
16 EventManager::EventManager()
18 setWantMouseMotion( true );
21 bool EventManager::mouseMotionEvent( const math::Vector2f
& pos
, const math::Vector2f
& rel
)
26 if( m_CurrentMouseMotionHandler
)
27 bResend
= m_CurrentMouseMotionHandler
->mouseMotionEvent( pos
, rel
);
29 if( m_DefaultHandler
&& bResend
)
30 bResend
= m_DefaultHandler
->mouseMotionEvent( pos
, rel
);
35 bool EventManager::mouseButtonEvent( const math::Vector2f
& pos
, e_MouseButton Button
, bool bPressed
)
40 if( m_CurrentMouseButtonHandler
)
41 bResend
= m_CurrentMouseButtonHandler
->mouseButtonEvent( pos
, Button
, bPressed
);
43 if( m_DefaultHandler
&& bResend
)
44 bResend
= m_DefaultHandler
->mouseButtonEvent( pos
, Button
, bPressed
);