#include <OgreStringConverter.h>
#include "ConfigCmdHandler.h"
#include "ConfigVarHandler.h"
#include "Console.h"
#include "Logger.h"
#include "Utilites.h"
Go to the source code of this file.
|
bool | ParseKeys (const Ogre::String &string, ButtonList &key_codes) |
| Parses a list of keys to retrieve their keycodes. More...
|
|
void | CmdBind (const Ogre::StringVector ¶ms) |
| Binds a key combination to a command. More...
|
|
void | CmdBindGameEvent (const Ogre::StringVector ¶ms) |
| Binds a key combination to a game event. More...
|
|
◆ CmdBind()
void CmdBind |
( |
const Ogre::StringVector & |
params | ) |
|
Binds a key combination to a command.
- Parameters
-
[in] | params | Binding parameters. Exactly three are required. The first one is the binding command name and it's not evaluated here. The second one must be one or more keycodes. The third one is the command string. If more or less than three parameter are passed, a usage string will be printed instead, and nothing will be done. |
- Todo:
- How are keycodes separated? spaces or '+'?
◆ CmdBindGameEvent()
void CmdBindGameEvent |
( |
const Ogre::StringVector & |
params | ) |
|
Binds a key combination to a game event.
- Parameters
-
[in] | params | Binding parameters. Exactly three are required. The first one is the binding command name and it's not evaluated here. The second one must be one or more keycodes. The third one is the game event string. If more or less than three parameter are passed, a usage string will be printed instead, and nothing will be done. |
- Todo:
- How are keycodes separated? spaces or '+'?
◆ ParseKeys()
bool ParseKeys |
( |
const Ogre::String & |
string, |
|
|
ButtonList & |
key_codes |
|
) |
| |
Parses a list of keys to retrieve their keycodes.
- Parameters
-
[in] | string | Every character in this string will be processed, and the correspondant keycodes will be added to 'key_codes'. |
[out] | key_codes | Every keycode assigned to a character in 'string' will be added here, even repeated ones. |
- Returns
- True if there were no errors, false if at least one of the characters in 'string' doesn't have an associated keycode. Every case wil be logged.