From 0814ba33222fa86e73ca3e5351175ba4b7b545e8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 15 Jul 2021 17:34:16 +0300 Subject: SL-443 Keybindings: Support reassigment of script interaction button --- indra/newview/llviewerinput.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerinput.h') diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h index 281a209896..32dd3c0e28 100644 --- a/indra/newview/llviewerinput.h +++ b/indra/newview/llviewerinput.h @@ -31,6 +31,7 @@ #include "llinitparam.h" const S32 MAX_KEY_BINDINGS = 128; // was 60 +const std::string script_mouse_handler_name = "sript_trigger_lbutton"; class LLNamedFunction { @@ -124,7 +125,8 @@ public: BOOL handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down); void scanMouse(); - bool isMouseBindUsed(const EMouseClickType mouse, const MASK mask = MASK_NONE, const S32 mode = MODE_THIRD_PERSON); + bool isMouseBindUsed(const EMouseClickType mouse, const MASK mask, const S32 mode); + bool isLMouseHandlingDefault(const S32 mode) { return mLMouseDefaultHandling[mode]; } private: bool scanKey(const std::vector &binding, @@ -163,6 +165,7 @@ private: // to send what we think function wants based on collection of bools (mKeyRepeated, mKeyLevel, mKeyDown) std::vector mKeyBindings[MODE_COUNT]; std::vector mMouseBindings[MODE_COUNT]; + bool mLMouseDefaultHandling[MODE_COUNT]; // Due to having special priority typedef std::map key_remap_t; key_remap_t mRemapKeys[MODE_COUNT]; -- cgit v1.2.3 From 48921a62322bd4eae17d1085256693aa66041dbd Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 15 Jul 2021 20:22:53 +0300 Subject: SL-443 Keybindings: Backward compatibility --- indra/newview/llviewerinput.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerinput.h') diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h index 32dd3c0e28..5340ec5fd0 100644 --- a/indra/newview/llviewerinput.h +++ b/indra/newview/llviewerinput.h @@ -101,7 +101,7 @@ public: third_person, sitting, edit_avatar; - + Optional version; Keys(); }; -- cgit v1.2.3 From e7563ff13fe1e6e77a0c6de5dcf0c1b67a6d2e2c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 15 Jul 2021 20:28:26 +0300 Subject: SL-443 Keybindings: Backward compatibility #2 --- indra/newview/llviewerinput.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerinput.h') diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h index 5340ec5fd0..b0c53b23ee 100644 --- a/indra/newview/llviewerinput.h +++ b/indra/newview/llviewerinput.h @@ -31,7 +31,8 @@ #include "llinitparam.h" const S32 MAX_KEY_BINDINGS = 128; // was 60 -const std::string script_mouse_handler_name = "sript_trigger_lbutton"; +const S32 keybindings_xml_version = 1; +const std::string script_mouse_handler_name = "script_trigger_lbutton"; class LLNamedFunction { @@ -101,7 +102,7 @@ public: third_person, sitting, edit_avatar; - Optional version; + Optional xml_version; // 'xml', because 'version' appears to be reserved Keys(); }; @@ -125,8 +126,8 @@ public: BOOL handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down); void scanMouse(); - bool isMouseBindUsed(const EMouseClickType mouse, const MASK mask, const S32 mode); - bool isLMouseHandlingDefault(const S32 mode) { return mLMouseDefaultHandling[mode]; } + bool isMouseBindUsed(const EMouseClickType mouse, const MASK mask, const S32 mode) const; + bool isLMouseHandlingDefault(const S32 mode) const { return mLMouseDefaultHandling[mode]; } private: bool scanKey(const std::vector &binding, -- cgit v1.2.3