00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00029 #include "OgreGUIInputPlugin.h"
00030
00031 #include <OIS/OISKeyboard.h>
00032 #include <OIS/OISMouse.h>
00033
00034
00035 namespace OIS { class InputManager; }
00036
00041 class GG_OGRE_PLUGIN_API OISInput :
00042 public GG::OgreGUIInputPlugin,
00043 public OIS::MouseListener,
00044 public OIS::KeyListener
00045 {
00046 public:
00047 OISInput();
00048 virtual ~OISInput();
00049
00050 virtual const Ogre::String& getName() const;
00051 virtual void install();
00052 virtual void initialise();
00053 virtual void shutdown();
00054 virtual void uninstall();
00055
00056 private:
00057 virtual void HandleSystemEvents();
00058 virtual void HandleWindowResize(int width, int height);
00059 virtual void HandleWindowClose();
00060
00061 virtual bool mouseMoved(const OIS::MouseEvent &event);
00062 virtual bool mousePressed(const OIS::MouseEvent &event, OIS::MouseButtonID id);
00063 virtual bool mouseReleased(const OIS::MouseEvent &event, OIS::MouseButtonID id);
00064
00065 virtual bool keyPressed(const OIS::KeyEvent& event);
00066 virtual bool keyReleased(const OIS::KeyEvent& event);
00067
00068 void CleanupInputManager();
00069
00070 OIS::InputManager* m_input_manager;
00071 OIS::Mouse* m_mouse;
00072 OIS::Keyboard* m_keyboard;
00073 };