Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 3, 2009, 5:33:31 PM (15 years ago)
Author:
rgrieder
Message:

New class: KeyBinderManager (yes, it really was necessary, I'm not such a Fan of zillions of classes as well) and moved the keybind command to it from GSLevel.
This new Singleton simply maps the keybind command to the right KeyBinder, selected by KeyBinderManager::setCurrent().
There is also a default KeyBinder (with keybindings.ini as file), which should do the Trick for now. Other Keybinders should only server special purposes (like in mini games or so).

DELETE YOUR keybindings.ini FILE! =
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/gamestates/GSLevel.h

    r5850 r5863  
    5757        void unloadLevel();
    5858
    59         // console commands
    60         void keybind(const std::string& command);
    61         void tkeybind(const std::string& command);
    62         void keybindInternal(const std::string& command, bool bTemporary);
    63 
    64         KeyBinder*               keyBinder_;               //!< tool that loads and manages the input bindings
    6559        InputState*              gameInputState_;          //!< input state for normal ingame playing
    6660        InputState*              guiMouseOnlyInputState_;  //!< input state if we only need the mouse to use the GUI
    6761        InputState*              guiKeysOnlyInputState_;   //!< input state if we only need the keys to use the GUI
    68 
    69         //##### ConfigValues #####
    70         std::string           keyDetectorCallbackCode_;
    71 
    72         // console commands
    73         ConsoleCommand*       ccKeybind_;
    74         ConsoleCommand*       ccTkeybind_;
    7562    };
    7663}
Note: See TracChangeset for help on using the changeset viewer.