From fe229598d7437a85988eb9255cd0f6bdb6e07cb7 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 21 Feb 2010 19:45:50 +0000 Subject: optimized keyboard input handling routines --- src/client/action.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'src/client/action.h') diff --git a/src/client/action.h b/src/client/action.h index 778c40d..5d56bb9 100644 --- a/src/client/action.h +++ b/src/client/action.h @@ -12,27 +12,42 @@ namespace client { -/// an Action that can be bound to a key +/** + * @brief a client action key slot. + * actions are interpreted directly by the client and do not go throught the + * command line systems. + */ class Action { public: /// actions - enum Identifier {None = 0}; + enum Identifier {None = 0, + Console, + Left, Right, Up, Down, + RollLeft, RollRight, + StrafeLeft, StrafeRight, + ThrustUp, ThrustDown, + Afterburner, Reverse, + Control, + CamLeft, CamRight, CamUp, CamDown, + ZoomIn, ZoomOut, + }; /// define a new action Action(const char *name, Identifier action, const char *info = 0); ~Action(); - /// name of the Action + /// name inline std::string const & name() const { return action_name; } - /// Action Identifier + /// identifier inline Identifier id() const { return action_id; } + /// text description inline std::string const & info() const { return action_info; } -- cgit v1.2.3