00001 00006 00007 00008 #ifndef __KX_MOUSEMANAGER 00009 #define __KX_MOUSEMANAGER 00010 00011 00012 #include "SCA_EventManager.h" 00013 00014 #include <vector> 00015 00016 using namespace std; 00017 00018 #include "SCA_IInputDevice.h" 00019 00020 00021 class SCA_MouseManager : public SCA_EventManager 00022 { 00023 00024 class SCA_IInputDevice* m_mousedevice; 00025 class SCA_LogicManager* m_logicmanager; 00026 00027 unsigned short m_xpos; // Cached location of the mouse pointer 00028 unsigned short m_ypos; 00029 00030 public: 00031 SCA_MouseManager(class SCA_LogicManager* logicmgr,class SCA_IInputDevice* mousedev) 00032 : SCA_EventManager(MOUSE_EVENTMGR), 00033 m_logicmanager(logicmgr), 00034 m_mousedevice (mousedev) 00035 { 00036 m_xpos = 0; 00037 m_ypos = 0; 00038 }; 00039 00040 virtual ~SCA_MouseManager() {}; 00041 00046 bool IsPressed(SCA_IInputDevice::KX_EnumInputs inputcode); 00047 virtual void NextFrame(double curtime,double deltatime); 00048 virtual void RegisterSensor(class SCA_ISensor* sensor); 00049 SCA_IInputDevice* GetInputDevice() { return m_mousedevice;} 00050 }; 00051 00052 #endif //__KX_MOUSEMANAGER