OISInput.h
Go to the documentation of this file.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 <GG/Ogre/Plugins/OgreGUIInputPlugin.h>
00030
00031 #include <OIS/OISKeyboard.h>
00032 #include <OIS/OISMouse.h>
00033
00034
00035 namespace OIS { class InputManager; }
00036
00043 class GG_OGRE_PLUGIN_API OISInput :
00044 public GG::OgreGUIInputPlugin,
00045 public OIS::MouseListener,
00046 public OIS::KeyListener
00047 {
00048 public:
00049 OISInput();
00050 virtual ~OISInput();
00051
00052 virtual const Ogre::String& getName() const;
00053 virtual void install();
00054 virtual void initialise();
00055 virtual void shutdown();
00056 virtual void uninstall();
00057
00058 private:
00059 virtual void HandleSystemEvents();
00060 virtual void HandleWindowResize(GG::X width, GG::Y height);
00061 virtual void HandleWindowClose();
00062
00063 virtual bool mouseMoved(const OIS::MouseEvent &event);
00064 virtual bool mousePressed(const OIS::MouseEvent &event, OIS::MouseButtonID id);
00065 virtual bool mouseReleased(const OIS::MouseEvent &event, OIS::MouseButtonID id);
00066
00067 virtual bool keyPressed(const OIS::KeyEvent& event);
00068 virtual bool keyReleased(const OIS::KeyEvent& event);
00069
00070 void CleanupInputManager();
00071
00072 OIS::InputManager* m_input_manager;
00073 OIS::Mouse* m_mouse;
00074 OIS::Keyboard* m_keyboard;
00075 };