diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-10-03 22:45:29 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-06-23 14:50:02 +0300 |
commit | e211372923bed31e632bc9825913d3d57cdc2d52 (patch) | |
tree | 104d4e314df3b0f329ea2be61f94fd631dda4174 /indra/newview/llsetkeybinddialog.cpp | |
parent | 13a25be08f0c81a759076907d7950baf4f2c3ef2 (diff) |
SL-6109 Remade 'ignore' list processing, renamed and reformed keybindings
Diffstat (limited to 'indra/newview/llsetkeybinddialog.cpp')
-rw-r--r-- | indra/newview/llsetkeybinddialog.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index 0ad71cb372..320f1f297d 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -34,6 +34,7 @@ #include "llcheckboxctrl.h" #include "lleventtimer.h" #include "llfocusmgr.h" +#include "llkeyconflict.h" class LLSetKeyBindDialog::Updater : public LLEventTimer { @@ -85,6 +86,7 @@ BOOL LLSetKeyBindDialog::postBuild() getChild<LLUICtrl>("Cancel")->setFocus(TRUE); pCheckBox = getChild<LLCheckBoxCtrl>("ignore_masks"); + pDesription = getChild<LLTextBase>("descritption"); gFocusMgr.setKeystrokesOnly(TRUE); @@ -116,14 +118,12 @@ void LLSetKeyBindDialog::draw() LLModalDialog::draw(); } -void LLSetKeyBindDialog::setParent(LLPanelPreferenceControls* parent, U32 key_mask) +void LLSetKeyBindDialog::setParent(LLKeyBindResponderInterface* parent, LLView* frustum_origin, U32 key_mask) { pParent = parent; - setFrustumOrigin(parent); + setFrustumOrigin(frustum_origin); mKeyFilterMask = key_mask; - LLTextBase *text_ctrl = getChild<LLTextBase>("descritption"); - std::string input; if ((key_mask & ALLOW_MOUSE) != 0) { @@ -137,7 +137,8 @@ void LLSetKeyBindDialog::setParent(LLPanelPreferenceControls* parent, U32 key_ma } input += getString("keyboard"); } - text_ctrl->setTextArg("[INPUT]", input); + pDesription->setText(getString("basic_description")); + pDesription->setTextArg("[INPUT]", input); bool can_ignore_masks = (key_mask & CAN_IGNORE_MASKS) != 0; pCheckBox->setVisible(can_ignore_masks); @@ -185,6 +186,13 @@ BOOL LLSetKeyBindDialog::handleKeyHere(KEY key, MASK mask) return FALSE; } + if (LLKeyConflictHandler::isReservedByMenu(key, mask)) + { + pDesription->setText(getString("reserved_by_menu")); + pDesription->setTextArg("[KEYSTR]", LLKeyboard::stringFromAccelerator(mask,key)); + return TRUE; + } + setKeyBind(CLICK_NONE, key, mask, pCheckBox->getValue().asBoolean()); closeFloater(); return TRUE; |