Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 15, 2008, 12:40:40 PM (16 years ago)
Author:
rgrieder
Message:

Added a master InputState that is always active (except of course in game state 'ioConsole' when there is no InputManager in the first place)
This is necessary to call the console whenever you like. The state is of 'extended' nature, so it can hold an arbitrary number of Handlers.
The KeyBinder however is not yet configured to manage multiple keybindings.ini —> next job ;)

Location:
code/trunk/src/orxonox/gamestates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/gamestates/GSGraphics.cc

    r1764 r1788  
    4646#include "core/CoreIncludes.h"
    4747#include "core/input/InputManager.h"
     48#include "core/input/KeyBinder.h"
     49#include "core/input/ExtendedInputState.h"
    4850#include "overlays/console/InGameConsole.h"
    4951#include "gui/GUIManager.h"
     
    6264        , console_(0)
    6365        , guiManager_(0)
     66        , masterKeyBinder_(0)
    6467        , frameCount_(0)
    6568        , statisticsRefreshCycle_(0)
     
    108111        this->renderWindow_->getCustomAttribute("WINDOW", &windowHnd);
    109112        inputManager_->initialise(windowHnd, renderWindow_->getWidth(), renderWindow_->getHeight(), true);
     113        // Configure master input state with a KeyBinder
     114        //masterKeyBinder_ = new KeyBinder();
     115        //inputManager_->getMasterInputState()->addKeyHandler(masterKeyBinder_);
    110116
    111117        // Load the InGameConsole
     
    135141        delete this->console_;
    136142
     143        //inputManager_->getMasterInputState()->removeKeyHandler(this->masterKeyBinder_);
     144        //delete this->masterKeyBinder_;
    137145        delete this->inputManager_;
    138146
  • code/trunk/src/orxonox/gamestates/GSGraphics.h

    r1755 r1788  
    7777        GUIManager*           guiManager_;
    7878
     79        KeyBinder*            masterKeyBinder_;
     80
    7981        // variables for time statistics
    8082        unsigned long         frameCount_;
Note: See TracChangeset for help on using the changeset viewer.