Index: code/trunk/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSGraphics.cc	(revision 3304)
+++ code/trunk/src/orxonox/gamestates/GSGraphics.cc	(revision 3327)
@@ -38,14 +38,14 @@
 #include <OgreRenderWindow.h>
 
-#include "core/ConfigValueIncludes.h"
+#include "util/Convert.h"
 #include "core/Clock.h"
+#include "core/CommandExecutor.h"
 #include "core/ConsoleCommand.h"
 #include "core/Core.h"
-#include "core/CoreIncludes.h"
 #include "core/Game.h"
 #include "core/GameMode.h"
 #include "core/input/InputManager.h"
 #include "core/input/KeyBinder.h"
-#include "core/input/SimpleInputState.h"
+#include "core/input/InputState.h"
 #include "core/Loader.h"
 #include "core/XMLFile.h"
@@ -70,18 +70,7 @@
         , debugOverlay_(0)
     {
-        RegisterRootObject(GSGraphics);
     }
 
     GSGraphics::~GSGraphics()
-    {
-    }
-
-    /**
-    @brief
-        this function does nothing
-
-        Indeed. Here goes nothing.
-    */
-    void GSGraphics::setConfigValues()
     {
     }
@@ -106,6 +95,4 @@
         GameMode::setShowsGraphics(true);
 
-        setConfigValues();
-
         // Load OGRE including the render window
         this->graphicsManager_ = new GraphicsManager();
@@ -122,9 +109,8 @@
 
         // Calls the InputManager which sets up the input devices.
-        inputManager_ = new InputManager();
-        inputManager_->initialise(windowHnd, renderWindow->getWidth(), renderWindow->getHeight(), true);
+        inputManager_ = new InputManager(windowHnd);
 
         // load master key bindings
-        masterInputState_ = InputManager::getInstance().createInputState<SimpleInputState>("master", true);
+        masterInputState_ = InputManager::getInstance().createInputState("master", true);
         masterKeyBinder_ = new KeyBinder();
         masterKeyBinder_->loadBindings("masterKeybindings.ini");
@@ -136,5 +122,5 @@
         // Load the InGameConsole
         console_ = new InGameConsole();
-        console_->initialise(renderWindow->getWidth(), renderWindow->getHeight());
+        console_->initialise();
 
         // load the CEGUI interface
@@ -149,5 +135,5 @@
 
         // enable master input
-        InputManager::getInstance().requestEnterState("master");
+        InputManager::getInstance().enterState("master");
     }
 
@@ -169,5 +155,5 @@
 
         masterInputState_->setHandler(0);
-        InputManager::getInstance().requestDestroyState("master");
+        InputManager::getInstance().destroyState("master");
         delete this->masterKeyBinder_;
 
@@ -232,33 +218,3 @@
         this->graphicsManager_->update(time);
     }
-
-    /**
-    @brief
-        Window has resized.
-    @param rw
-        The render window it occured in
-    @note
-        GraphicsManager has a render window stored itself. This is the same
-        as rw. But we have to be careful when using multiple render windows!
-    */
-    void GSGraphics::windowResized(unsigned int newWidth, unsigned int newHeight)
-    {
-        // OIS needs this under linux even if we only use relative input measurement.
-        if (this->inputManager_)
-            this->inputManager_->setWindowExtents(newWidth, newHeight);
-    }
-
-    /**
-    @brief
-        Window focus has changed.
-    @param rw
-        The render window it occured in
-    */
-    void GSGraphics::windowFocusChanged()
-    {
-        // instruct InputManager to clear the buffers (core library so we cannot use the interface)
-        if (this->inputManager_)
-            this->inputManager_->clearBuffers();
-    }
-
 }
Index: code/trunk/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSGraphics.h	(revision 3304)
+++ code/trunk/src/orxonox/gamestates/GSGraphics.h	(revision 3327)
@@ -37,7 +37,5 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "core/GameState.h"
-#include "interfaces/WindowEventListener.h"
 
 namespace orxonox
@@ -49,10 +47,9 @@
         This game state is only left out if we start a dedicated server where no graphics are present.
     */
-    class _OrxonoxExport GSGraphics : public GameState, public WindowEventListener
+    class _OrxonoxExport GSGraphics : public GameState
     {
     public:
         GSGraphics(const GameStateConstrParams& params);
         ~GSGraphics();
-        void setConfigValues();
 
         void activate();
@@ -63,8 +60,4 @@
 
     private:
-        // Window events from WindowEventListener
-        void windowResized(unsigned int newWidth, unsigned int newHeight);
-        void windowFocusChanged();
-
         // managed singletons
         InputManager*         inputManager_;        //!< Reference to input management
@@ -75,5 +68,5 @@
 
         KeyBinder*            masterKeyBinder_;     //!< Key binder for master key bindings
-        SimpleInputState*     masterInputState_;    //!< Special input state for master input
+        InputState*           masterInputState_;    //!< Special input state for master input
         XMLFile*              debugOverlay_;
         ConsoleCommand*       ccToggleGUI_;         //!< Console command to toggle GUI
Index: code/trunk/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.cc	(revision 3304)
+++ code/trunk/src/orxonox/gamestates/GSLevel.cc	(revision 3327)
@@ -31,5 +31,5 @@
 
 #include "core/input/InputManager.h"
-#include "core/input/SimpleInputState.h"
+#include "core/input/InputState.h"
 #include "core/input/KeyBinder.h"
 #include "core/Clock.h"
@@ -90,13 +90,13 @@
         if (GameMode::showsGraphics())
         {
-            gameInputState_ = InputManager::getInstance().createInputState<SimpleInputState>("game");
+            gameInputState_ = InputManager::getInstance().createInputState("game");
             keyBinder_ = new KeyBinder();
             keyBinder_->loadBindings("keybindings.ini");
             gameInputState_->setHandler(keyBinder_);
 
-            guiMouseOnlyInputState_ = InputManager::getInstance().createInputState<SimpleInputState>("guiMouseOnly");
+            guiMouseOnlyInputState_ = InputManager::getInstance().createInputState("guiMouseOnly");
             guiMouseOnlyInputState_->setMouseHandler(GUIManager::getInstancePtr());
 
-            guiKeysOnlyInputState_ = InputManager::getInstance().createInputState<SimpleInputState>("guiKeysOnly");
+            guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly");
             guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr());
 
@@ -134,5 +134,5 @@
 
             // level is loaded: we can start capturing the input
-            InputManager::getInstance().requestEnterState("game");
+            InputManager::getInstance().enterState("game");
         }
     }
@@ -144,5 +144,5 @@
             GUIManager::getInstance().showGUI("inGameTest");
             GUIManager::getInstance().executeCode("showCursor()");
-            InputManager::getInstance().requestEnterState("guiMouseOnly");
+            InputManager::getInstance().enterState("guiMouseOnly");
         }
         else
@@ -150,5 +150,5 @@
             GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")");
             GUIManager::getInstance().executeCode("hideCursor()");
-            InputManager::getInstance().requestLeaveState("guiMouseOnly");
+            InputManager::getInstance().leaveState("guiMouseOnly");
         }
     }
@@ -178,5 +178,5 @@
 
         if (GameMode::showsGraphics())
-            InputManager::getInstance().requestLeaveState("game");
+            InputManager::getInstance().leaveState("game");
 
         if (GameMode::isMaster())
@@ -218,5 +218,5 @@
             guiMouseOnlyInputState_->setHandler(0);
             guiKeysOnlyInputState_->setHandler(0);
-            InputManager::getInstance().requestDestroyState("game");
+            InputManager::getInstance().destroyState("game");
             if (this->keyBinder_)
             {
@@ -286,5 +286,5 @@
                 {
                     COUT(0) << "Press any button/key or move a mouse/joystick axis" << std::endl;
-                    InputManager::getInstance().requestEnterState("detector");
+                    InputManager::getInstance().enterState("detector");
                     bindingString = command;
                     bTemporarySaved = bTemporary;
@@ -301,5 +301,5 @@
                     COUT(0) << "Binding string \"" << bindingString << "\" on key '" << name << "'" << std::endl;
                     this->keyBinder_->setBinding(bindingString, name, bTemporarySaved);
-                    InputManager::getInstance().requestLeaveState("detector");
+                    InputManager::getInstance().leaveState("detector");
                     bound = true;
                 }
Index: code/trunk/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 3304)
+++ code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 3327)
@@ -63,7 +63,7 @@
 
         KeyBinder*            keyBinder_;               //!< tool that loads and manages the input bindings
-        SimpleInputState*     gameInputState_;          //!< input state for normal ingame playing
-        SimpleInputState*     guiMouseOnlyInputState_;  //!< input state if we only need the mouse to use the GUI
-        SimpleInputState*     guiKeysOnlyInputState_;   //!< input state if we only need the keys to use the GUI
+        InputState*           gameInputState_;          //!< input state for normal ingame playing
+        InputState*           guiMouseOnlyInputState_;  //!< input state if we only need the mouse to use the GUI
+        InputState*           guiKeysOnlyInputState_;   //!< input state if we only need the keys to use the GUI
         Radar*                radar_;                   //!< represents the Radar (not the HUD part)
         CameraManager*        cameraManager_;           //!< camera manager for this level
Index: code/trunk/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSMainMenu.cc	(revision 3304)
+++ code/trunk/src/orxonox/gamestates/GSMainMenu.cc	(revision 3327)
@@ -32,5 +32,5 @@
 
 #include "core/input/InputManager.h"
-#include "core/input/SimpleInputState.h"
+#include "core/input/InputState.h"
 #include "core/Game.h"
 #include "core/Clock.h"
@@ -57,7 +57,7 @@
     void GSMainMenu::activate()
     {
-        inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("mainMenu");
+        inputState_ = InputManager::getInstance().createInputState("mainMenu");
         inputState_->setHandler(GUIManager::getInstancePtr());
-        inputState_->setJoyStickHandler(&InputManager::EMPTY_HANDLER);
+        inputState_->setJoyStickHandler(&InputHandler::EMPTY);
 
         // create an empty Scene
@@ -96,5 +96,5 @@
         }
 
-        InputManager::getInstance().requestEnterState("mainMenu");
+        InputManager::getInstance().enterState("mainMenu");
 
         this->ambient_ = new SoundMainMenu();
@@ -106,6 +106,6 @@
         delete this->ambient_;
 
-        InputManager::getInstance().requestLeaveState("mainMenu");
-        InputManager::getInstance().requestDestroyState("mainMenu");
+        InputManager::getInstance().leaveState("mainMenu");
+        InputManager::getInstance().destroyState("mainMenu");
 
         GUIManager::getInstance().setCamera(0);
Index: code/trunk/src/orxonox/gamestates/GSMainMenu.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSMainMenu.h	(revision 3304)
+++ code/trunk/src/orxonox/gamestates/GSMainMenu.h	(revision 3327)
@@ -53,5 +53,5 @@
 
     private:
-        SimpleInputState* inputState_;
+        InputState*       inputState_;
         Scene*            scene_;
         Ogre::Camera*     camera_;
