Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 12, 2011, 11:54:07 AM (13 years ago)
Author:
landauf
Message:

added function to KeyBinder which allows to change the keybind mode (OnPress, OnRelease, OnHold) of a command which is bound to a key.
enhanced ConsoleCommand (+Manipulator) to use this feature.

input system experts, please review :D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/command/ConsoleCommand.cc

    r7401 r7861  
    3838#include "core/Language.h"
    3939#include "core/GameMode.h"
     40#include "core/input/KeyBinder.h"
     41#include "core/input/KeyBinderManager.h"
    4042
    4143namespace orxonox
     
    575577
    576578    /**
     579        @brief Changes the keybind mode.
     580    */
     581    ConsoleCommand& ConsoleCommand::changeKeybindMode(KeybindMode::Value mode)
     582    {
     583        KeyBinderManager::getInstance().getCurrent()->changeMode(this, mode);
     584
     585        this->keybindMode(mode);
     586        return *this;
     587    }
     588
     589    /**
    577590        @brief Returns the command with given group an name.
    578591        @param group The group of the requested command
Note: See TracChangeset for help on using the changeset viewer.