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