aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerkeyboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewerkeyboard.h')
-rw-r--r--linden/indra/newview/llviewerkeyboard.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/linden/indra/newview/llviewerkeyboard.h b/linden/indra/newview/llviewerkeyboard.h
index 2013125..115bd69 100644
--- a/linden/indra/newview/llviewerkeyboard.h
+++ b/linden/indra/newview/llviewerkeyboard.h
@@ -40,7 +40,10 @@ const S32 MAX_KEY_BINDINGS = 128; // was 60
40class LLNamedFunction 40class LLNamedFunction
41{ 41{
42public: 42public:
43 const char *mName; 43 LLNamedFunction() : mFunction(NULL) { };
44 ~LLNamedFunction() { };
45
46 std::string mName;
44 LLKeyFunc mFunction; 47 LLKeyFunc mFunction;
45}; 48};
46 49
@@ -65,16 +68,16 @@ public:
65 68
66 BOOL handleKey(KEY key, MASK mask, BOOL repeated); 69 BOOL handleKey(KEY key, MASK mask, BOOL repeated);
67 70
68 void bindNamedFunction(const char *name, LLKeyFunc func); 71 void bindNamedFunction(const std::string& name, LLKeyFunc func);
69 72
70 S32 loadBindings(const char *filename); // returns number bound, 0 on error 73 S32 loadBindings(const std::string& filename); // returns number bound, 0 on error
71 EKeyboardMode getMode(); 74 EKeyboardMode getMode();
72 75
73 BOOL modeFromString(const char *string, S32 *mode); // False on failure 76 BOOL modeFromString(const std::string& string, S32 *mode); // False on failure
74 77
75 void scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level); 78 void scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level);
76protected: 79protected:
77 BOOL bindKey(const S32 mode, const KEY key, const MASK mask, const char *function_name); 80 BOOL bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name);
78 S32 mNamedFunctionCount; 81 S32 mNamedFunctionCount;
79 LLNamedFunction mNamedFunctions[MAX_NAMED_FUNCTIONS]; 82 LLNamedFunction mNamedFunctions[MAX_NAMED_FUNCTIONS];
80 83