From b9294516fc65f7a172ae119e20865b70c43c19c0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 19 Sep 2019 16:55:28 +0300 Subject: SL-6109 Implement keybindings --- indra/newview/llfloaterpreference.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 526214a617..0bbfdc7c17 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -148,7 +148,7 @@ public: void onSelectSkin(); void onClickSetKey(); void setKey(KEY key); - void setMouse(LLMouseHandler::EClickType click); + void setMouse(EMouseClickType click); void onClickSetMiddleMouse(); void onClickSetSounds(); void onClickEnablePopup(); -- cgit v1.2.3 From 3633ccf1a1077d3e53e7f125d1dd5ed2aaa98906 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 19 Aug 2019 23:16:29 +0300 Subject: SL_6109 Rebinding --- indra/newview/llfloaterpreference.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 0bbfdc7c17..bfccd64624 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -294,6 +294,27 @@ private: LOG_CLASS(LLPanelPreferenceGraphics); }; +class LLPanelPreferenceControls : public LLPanelPreference +{ + LOG_CLASS(LLPanelPreferenceControls); +public: + BOOL postBuild(); + void populateControlTable(); + void cancel(); + void saveSettings(); + void resetDirtyChilds(); + + void onListCommit(); + void onSetKey(KEY key, MASK mask); + void onSetMouse(LLMouseHandler::EClickType click, MASK mask); + +protected: + bool hasDirtyChilds(); + +private: + LLScrollListCtrl* pControlsTable; +}; + class LLFloaterPreferenceGraphicsAdvanced : public LLFloater { public: -- cgit v1.2.3 From 4df05c5a8995158922c7b7aacfef442ac8ae6fdd Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 17 Sep 2019 21:36:59 +0300 Subject: SL-6109 Keyaboard support ready --- indra/newview/llfloaterpreference.h | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index bfccd64624..c36dee114c 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -37,12 +37,14 @@ #include "llavatarpropertiesprocessor.h" #include "llconversationlog.h" #include "llsearcheditor.h" +#include "llkeyconflict.h" class LLConversationLogObserver; class LLPanelPreference; class LLPanelLCD; class LLPanelDebug; class LLMessageSystem; +class LLComboBox; class LLScrollListCtrl; class LLSliderCtrl; class LLSD; @@ -147,8 +149,6 @@ public: void onClickSkin(LLUICtrl* ctrl,const LLSD& userdata); void onSelectSkin(); void onClickSetKey(); - void setKey(KEY key); - void setMouse(EMouseClickType click); void onClickSetMiddleMouse(); void onClickSetSounds(); void onClickEnablePopup(); @@ -298,21 +298,36 @@ class LLPanelPreferenceControls : public LLPanelPreference { LOG_CLASS(LLPanelPreferenceControls); public: + LLPanelPreferenceControls(); + ~LLPanelPreferenceControls(); + BOOL postBuild(); - void populateControlTable(); + BOOL handleHover(S32 x, S32 y, MASK mask); + + void apply(); void cancel(); void saveSettings(); void resetDirtyChilds(); void onListCommit(); - void onSetKey(KEY key, MASK mask); - void onSetMouse(LLMouseHandler::EClickType click, MASK mask); - -protected: - bool hasDirtyChilds(); + void onModeCommit(); + void onSetKeyBind(EMouseClickType click, KEY key, MASK mask); + void onRestoreDefaults(); + void onDefaultKeyBind(); private: + void addGroupRow(const std::string &icon, S32 index); + void regenerateControls(); + void populateControlTable(); + void addSeparator(); + LLScrollListCtrl* pControlsTable; + LLComboBox *pKeyModeBox; + LLKeyConflictHandler mConflictHandler[LLKeyConflictHandler::MODE_COUNT]; + S32 mEditingIndex; + S32 mEditingColumn; + S32 mEditingMode; + bool mShowKeyDialog; }; class LLFloaterPreferenceGraphicsAdvanced : public LLFloater -- cgit v1.2.3 From c60b929fbb615f8d73f7bf42849b5628bf0f8f7a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 25 Sep 2019 17:54:36 +0300 Subject: SL-6109 Mouse support ready --- indra/newview/llfloaterpreference.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index c36dee114c..dbf493b60d 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -311,7 +311,7 @@ public: void onListCommit(); void onModeCommit(); - void onSetKeyBind(EMouseClickType click, KEY key, MASK mask); + void onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool ignore_mask); void onRestoreDefaults(); void onDefaultKeyBind(); -- cgit v1.2.3 From 2532a2ee9ee9003e2c6b72f8da19979a9e3dd2f6 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 26 Sep 2019 22:28:18 +0300 Subject: SL-6109 Conflict resolution --- indra/newview/llfloaterpreference.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index dbf493b60d..9178927e74 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -46,6 +46,7 @@ class LLPanelDebug; class LLMessageSystem; class LLComboBox; class LLScrollListCtrl; +class LLScrollListCell; class LLSliderCtrl; class LLSD; class LLTextBox; @@ -314,15 +315,18 @@ public: void onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool ignore_mask); void onRestoreDefaults(); void onDefaultKeyBind(); + void onCancelKeyBind(); private: void addGroupRow(const std::string &icon, S32 index); void regenerateControls(); void populateControlTable(); void addSeparator(); + void updateTable(); LLScrollListCtrl* pControlsTable; LLComboBox *pKeyModeBox; + LLScrollListCell *mHighlightedCell; LLKeyConflictHandler mConflictHandler[LLKeyConflictHandler::MODE_COUNT]; S32 mEditingIndex; S32 mEditingColumn; -- cgit v1.2.3 From 0b8021870335ff9b9684fb193c6e0fe2f02b4091 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 27 Sep 2019 19:53:33 +0300 Subject: SL-6109 Cleanup, run commands, and preparation for tooltip support --- indra/newview/llfloaterpreference.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 9178927e74..e07ead7e18 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -318,7 +318,7 @@ public: void onCancelKeyBind(); private: - void addGroupRow(const std::string &icon, S32 index); + void addGroupRow(const std::string &control_name, const std::string &icon); void regenerateControls(); void populateControlTable(); void addSeparator(); @@ -328,7 +328,7 @@ private: LLComboBox *pKeyModeBox; LLScrollListCell *mHighlightedCell; LLKeyConflictHandler mConflictHandler[LLKeyConflictHandler::MODE_COUNT]; - S32 mEditingIndex; + std::string mEditingControl; S32 mEditingColumn; S32 mEditingMode; bool mShowKeyDialog; -- cgit v1.2.3 From 04081c0bc882cecb7647648eb035f0f2334bf983 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 1 Oct 2019 22:23:49 +0300 Subject: SL-6109 Better hover and docking of keybinder --- indra/newview/llfloaterpreference.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index e07ead7e18..570f1c6caf 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -303,7 +303,6 @@ public: ~LLPanelPreferenceControls(); BOOL postBuild(); - BOOL handleHover(S32 x, S32 y, MASK mask); void apply(); void cancel(); @@ -326,12 +325,10 @@ private: LLScrollListCtrl* pControlsTable; LLComboBox *pKeyModeBox; - LLScrollListCell *mHighlightedCell; LLKeyConflictHandler mConflictHandler[LLKeyConflictHandler::MODE_COUNT]; std::string mEditingControl; S32 mEditingColumn; S32 mEditingMode; - bool mShowKeyDialog; }; class LLFloaterPreferenceGraphicsAdvanced : public LLFloater -- cgit v1.2.3 From 2e656ed358af28f56c8b900345956d431f8c7b4d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 2 Oct 2019 20:51:47 +0300 Subject: SL-6109 Removed obsolete control, moved table init to xml, cleanup --- indra/newview/llfloaterpreference.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 570f1c6caf..90697341cb 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -130,13 +130,6 @@ protected: // callback for when client turns on impostors void onAvatarImpostorsEnable(); - // callback for commit in the "Single click on land" and "Double click on land" comboboxes. - void onClickActionChange(); - // updates click/double-click action settings depending on controls values - void updateClickActionSettings(); - // updates click/double-click action controls depending on values from settings.xml - void updateClickActionControls(); - public: // This function squirrels away the current values of the controls so that // cancel() can restore them. @@ -149,7 +142,6 @@ public: void onClickResetCache(); void onClickSkin(LLUICtrl* ctrl,const LLSD& userdata); void onSelectSkin(); - void onClickSetKey(); void onClickSetMiddleMouse(); void onClickSetSounds(); void onClickEnablePopup(); @@ -205,7 +197,6 @@ private: static std::string sSkin; notifications_map mNotificationOptions; - bool mClickActionDirty; ///< Set to true when the click/double-click options get changed by user. bool mGotPersonalInfo; bool mOriginalIMViaEmail; bool mLanguageChanged; @@ -317,7 +308,6 @@ public: void onCancelKeyBind(); private: - void addGroupRow(const std::string &control_name, const std::string &icon); void regenerateControls(); void populateControlTable(); void addSeparator(); -- cgit v1.2.3 From 13a25be08f0c81a759076907d7950baf4f2c3ef2 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 3 Oct 2019 19:46:12 +0300 Subject: SL-6109 Better menu accelerator support and slight reorganization --- indra/newview/llfloaterpreference.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 90697341cb..9c4f6fad46 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -37,6 +37,7 @@ #include "llavatarpropertiesprocessor.h" #include "llconversationlog.h" #include "llsearcheditor.h" +#include "llsetkeybinddialog.h" #include "llkeyconflict.h" class LLConversationLogObserver; @@ -286,7 +287,7 @@ private: LOG_CLASS(LLPanelPreferenceGraphics); }; -class LLPanelPreferenceControls : public LLPanelPreference +class LLPanelPreferenceControls : public LLPanelPreference, public LLKeyBindResponderInterface { LOG_CLASS(LLPanelPreferenceControls); public: @@ -302,7 +303,7 @@ public: void onListCommit(); void onModeCommit(); - void onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool ignore_mask); + bool onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool ignore_mask); void onRestoreDefaults(); void onDefaultKeyBind(); void onCancelKeyBind(); -- cgit v1.2.3 From e211372923bed31e632bc9825913d3d57cdc2d52 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 3 Oct 2019 22:45:29 +0300 Subject: SL-6109 Remade 'ignore' list processing, renamed and reformed keybindings --- indra/newview/llfloaterpreference.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 9c4f6fad46..8adfb79038 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -292,7 +292,7 @@ class LLPanelPreferenceControls : public LLPanelPreference, public LLKeyBindResp LOG_CLASS(LLPanelPreferenceControls); public: LLPanelPreferenceControls(); - ~LLPanelPreferenceControls(); + virtual ~LLPanelPreferenceControls(); BOOL postBuild(); @@ -303,10 +303,10 @@ public: void onListCommit(); void onModeCommit(); - bool onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool ignore_mask); void onRestoreDefaults(); - void onDefaultKeyBind(); - void onCancelKeyBind(); + /*virtual*/ bool onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool ignore_mask); + /*virtual*/ void onDefaultKeyBind(); + /*virtual*/ void onCancelKeyBind(); private: void regenerateControls(); -- cgit v1.2.3 From 6597c7696783ce56f89b34a4b6440363635be6a6 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 28 Oct 2019 17:52:31 +0200 Subject: SL-6109 - Fixed line endings in xml file - Removed obsolete UI element and it's code - Fixed issue with return value caused by rebase --- indra/newview/llfloaterpreference.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 8adfb79038..1d6b3a9e1a 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -143,7 +143,6 @@ public: void onClickResetCache(); void onClickSkin(LLUICtrl* ctrl,const LLSD& userdata); void onSelectSkin(); - void onClickSetMiddleMouse(); void onClickSetSounds(); void onClickEnablePopup(); void onClickDisablePopup(); -- cgit v1.2.3 From b5b266c4d2bdf71d89f5d2545e7d6e7966082c90 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 4 Nov 2019 15:48:45 +0200 Subject: SL-6109 - Fixed defaults not restoring reliably - Fixed temporary changes not lifting reliably - Fixed switching modes was dropping changes to mode we switch to --- indra/newview/llfloaterpreference.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 1d6b3a9e1a..f89923e497 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -308,7 +308,9 @@ public: /*virtual*/ void onCancelKeyBind(); private: + // reloads settings, discards current changes, updates table void regenerateControls(); + void populateControlTable(); void addSeparator(); void updateTable(); -- cgit v1.2.3 From 73a1877ff0abcba46f66ef55440274119427723b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 7 Nov 2019 20:09:25 +0200 Subject: SL-6109 - Edit mode appears to be obsolete and is not used, cleaned up - Improved ability to set defaults - Improved some labels - Made buttons bigger to accomodate languages with longer descriptions - Added ability to assign key for all modes simultaneously --- indra/newview/llfloaterpreference.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index f89923e497..6c2e655270 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -302,9 +302,10 @@ public: void onListCommit(); void onModeCommit(); - void onRestoreDefaults(); - /*virtual*/ bool onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool ignore_mask); - /*virtual*/ void onDefaultKeyBind(); + void onRestoreDefaultsBtn(); + void onRestoreDefaultsResponse(const LLSD& notification, const LLSD& response); + /*virtual*/ bool onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool all_modes); + /*virtual*/ void onDefaultKeyBind(bool all_modes); /*virtual*/ void onCancelKeyBind(); private: -- cgit v1.2.3 From 629cd92c47e90a1fb8711c46bd406476d01e9b9b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 12 Jun 2020 18:51:13 +0300 Subject: SL-13421 Removed camera control keybindings from mouselook --- indra/newview/llfloaterpreference.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 6c2e655270..ea6e1070cd 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -312,8 +312,14 @@ private: // reloads settings, discards current changes, updates table void regenerateControls(); + // These fuctions do not clean previous content + bool addControlTableColumns(const std::string &filename); + bool addControlTableRows(const std::string &filename); + void addControlTableSeparator(); + + // Cleans content and then adds content from xml files according to current mEditingMode void populateControlTable(); - void addSeparator(); + // Updates keybindings from storage to table void updateTable(); LLScrollListCtrl* pControlsTable; -- cgit v1.2.3 From e578491be761fefa34e4041458e2cf5badc81873 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 15 Jun 2020 20:35:58 +0300 Subject: SL-13418 Restored previously removed 'click on land' controls from 'move & view' According to UX UI engineer. Also adapted it to new system, but it needs a better solution. --- indra/newview/llfloaterpreference.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index ea6e1070cd..066deb97ee 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -106,6 +106,8 @@ public: void selectPrivacyPanel(); void selectChatPanel(); void getControlNames(std::vector& names); + // updates click/double-click action controls depending on values from settings.xml + void updateClickActionViews(); protected: void onBtnOK(const LLSD& userdata); @@ -131,6 +133,11 @@ protected: // callback for when client turns on impostors void onAvatarImpostorsEnable(); + // callback for commit in the "Single click on land" and "Double click on land" comboboxes. + void onClickActionChange(); + // updates click/double-click action keybindngs depending on view values + void updateClickActionControls(); + public: // This function squirrels away the current values of the controls so that // cancel() can restore them. @@ -304,9 +311,20 @@ public: void onModeCommit(); void onRestoreDefaultsBtn(); void onRestoreDefaultsResponse(const LLSD& notification, const LLSD& response); + + // Bypass to let Move & view read values without need to create own key binding handler + // Todo: consider a better way to share access to keybindings + bool canKeyBindHandle(const std::string &control, EMouseClickType click, KEY key, MASK mask); + // Bypasses to let Move & view modify values without need to create own key binding handler + void setKeyBind(const std::string &control, EMouseClickType click, KEY key, MASK mask, bool set /*set or reset*/ ); + + // from interface /*virtual*/ bool onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool all_modes); /*virtual*/ void onDefaultKeyBind(bool all_modes); - /*virtual*/ void onCancelKeyBind(); + /*virtual*/ void onCancelKeyBind(); + + // Updates keybindings from storage to table + void updateTable(); private: // reloads settings, discards current changes, updates table @@ -319,8 +337,6 @@ private: // Cleans content and then adds content from xml files according to current mEditingMode void populateControlTable(); - // Updates keybindings from storage to table - void updateTable(); LLScrollListCtrl* pControlsTable; LLComboBox *pKeyModeBox; -- cgit v1.2.3 From 74aba5768e62f2260ac44c5244145a0a689bf3d5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 16 Jun 2020 09:27:41 +0300 Subject: SL-13418 Move and view panel now applies changes on the go --- indra/newview/llfloaterpreference.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloaterpreference.h') diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 066deb97ee..1268935712 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -317,15 +317,13 @@ public: bool canKeyBindHandle(const std::string &control, EMouseClickType click, KEY key, MASK mask); // Bypasses to let Move & view modify values without need to create own key binding handler void setKeyBind(const std::string &control, EMouseClickType click, KEY key, MASK mask, bool set /*set or reset*/ ); + void updateAndApply(); // from interface /*virtual*/ bool onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool all_modes); /*virtual*/ void onDefaultKeyBind(bool all_modes); /*virtual*/ void onCancelKeyBind(); - // Updates keybindings from storage to table - void updateTable(); - private: // reloads settings, discards current changes, updates table void regenerateControls(); @@ -336,7 +334,10 @@ private: void addControlTableSeparator(); // Cleans content and then adds content from xml files according to current mEditingMode - void populateControlTable(); + void populateControlTable(); + + // Updates keybindings from storage to table + void updateTable(); LLScrollListCtrl* pControlsTable; LLComboBox *pKeyModeBox; -- cgit v1.2.3