Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2009, 4:12:04 PM (15 years ago)
Author:
rgrieder
Message:

Added a few more generic parts to the input library:

  • Created Mouse and Keyboard to join JoyStick and provided them with a templated base class (InputDeviceTemplated) that does most of the work (reduces quite some redundancy)
  • Created InputPrereqs.h from InputInterfaces.h and destroyed the latter
  • Exported InputHandler to its own file and replaced KeyHandler, MouseHandler and JoyStickHandler with the single InputHandler.
  • Deleted the SimpleInputState: There is only one class now which fulfills all our needs.

In general there is now less code and the code itself has more 'pluses'. However I haven't really thrown away any feature at all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/orxonox/gamestates/GSMainMenu.cc

    r3245 r3274  
    3232
    3333#include "core/input/InputManager.h"
    34 #include "core/input/SimpleInputState.h"
     34#include "core/input/InputState.h"
    3535#include "core/Game.h"
    3636#include "core/Clock.h"
     
    5757    void GSMainMenu::activate()
    5858    {
    59         inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("mainMenu");
     59        inputState_ = InputManager::getInstance().createInputState("mainMenu");
    6060        inputState_->setHandler(GUIManager::getInstancePtr());
    61         inputState_->setJoyStickHandler(&InputManager::EMPTY_HANDLER);
     61        inputState_->setJoyStickHandler(&InputHandler::EMPTY);
    6262
    6363        // create an empty Scene
Note: See TracChangeset for help on using the changeset viewer.