29 #ifndef _KeyBinderManager_H__ 30 #define _KeyBinderManager_H__ 62 void setConfigValues();
74 {
return binders_[this->defaultFilename_]; }
79 {
return defaultFilename_; }
82 { this->setCurrent(this->defaultFilename_); }
98 { this->keybindInternal(command,
true); }
101 void registerKeybindCallback(
LuaFunctor*
function);
109 void keybindKeyPressed(
const std::string& keyName);
110 void defaultFilenameChanged();
::std::string string
Definition: gtest-port.h:756
std::map< std::string, KeyBinder * > binders_
Currently selected KeyBinder (never nullptr!)
Definition: KeyBinderManager.h:114
This is the base class of all objects which may contain config values.
Definition: Configurable.h:47
void keybind(const std::string &command)
Bind 'command' to any key pressed after this call (use with care!)
Definition: KeyBinderManager.h:95
KeyBinder * getCurrent()
Returns the currently selected KeyBinder.
Definition: KeyBinderManager.h:66
Base for singleton classes.
Definition: Singleton.h:114
static KeyBinderManager & getInstance()
Definition: KeyBinderManager.h:64
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
void setToDefault()
Selects the default KeyBinder as current one.
Definition: KeyBinderManager.h:81
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI() command(const std::string &fragment)
Returns a list of commands and groups and also supports auto-completion of the arguments of these com...
Definition: ArgumentCompletionFunctions.cc:178
std::string defaultFilename_
Tells whether the default one is loaded.
Definition: KeyBinderManager.h:116
Maps mouse, keyboard and joy stick input to command strings and executes them.
Definition: KeyBinder.h:59
#define _CoreExport
Definition: CorePrereqs.h:61
callback class that executes lua code
Definition: LuaState.h:58
std::string command_
Stores tkeybind/keybind value.
Definition: KeyBinderManager.h:122
Declaration of Configurable, the base class of all objects which may contain config values...
static KeyBinderManager * singletonPtr_s
Stores the command received by (t)keybind.
Definition: KeyBinderManager.h:124
KeyBinder * currentBinder_
Definition: KeyBinderManager.h:113
std::shared_ptr< LuaFunctor > callbackFunction_
Name of the file with the default key bindings.
Definition: KeyBinderManager.h:119
KeyBinder * getDefault()
Returns the default KeyBinder.
Definition: KeyBinderManager.h:73
Definition of the Singleton template that is used as base class for classes that allow only one insta...
bool bBinding_
Function to be called when key was pressed after "keybind" command.
Definition: KeyBinderManager.h:120
bool bDefaultFileLoaded_
All loaded KeyBinders.
Definition: KeyBinderManager.h:115
static T & getInstance()
Returns a reference to the singleton instance.
Definition: Singleton.h:118
bool bTemporary_
Tells whether a key binding process is active.
Definition: KeyBinderManager.h:121
const std::string & getDefaultFilename()
Returns the filename of the default key bindings.
Definition: KeyBinderManager.h:78
Handles the KeyBinders and supplies them throughout the game.
Definition: KeyBinderManager.h:55
void tkeybind(const std::string &command)
Bind 'command' to any key pressed after this call (use with care!), but temporarily (no file save) ...
Definition: KeyBinderManager.h:97