summaryrefslogtreecommitdiff
path: root/indra/newview/llsetkeybinddialog.cpp
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-06-12 17:04:34 -0700
committerGitHub <noreply@github.com>2024-06-12 17:04:34 -0700
commit100ebbab2437de7f5d124a0d7b8279a7a7b57656 (patch)
treee8b4200dae16e89698c2f3eadae05634041681a1 /indra/newview/llsetkeybinddialog.cpp
parentf5e2708a0fc4e08d3d0a5dc393bbd4bac09e1c55 (diff)
parentae74ca80692c8bcf157e903033fcfa1778706d64 (diff)
Merge pull request #1745 from secondlife/project/gltf_development
move project/gltf development to develop
Diffstat (limited to 'indra/newview/llsetkeybinddialog.cpp')
-rw-r--r--indra/newview/llsetkeybinddialog.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp
index dbab7e53b6..e172e15a0e 100644
--- a/indra/newview/llsetkeybinddialog.cpp
+++ b/indra/newview/llsetkeybinddialog.cpp
@@ -1,25 +1,25 @@
-/**
+/**
* @file llsetkeybinddialog.cpp
* @brief LLSetKeyBindDialog class implementation.
*
* $LicenseInfo:firstyear=2019&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2019, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -53,11 +53,11 @@ public:
virtual ~Updater(){}
protected:
- BOOL tick()
+ bool tick()
{
mCallback(mMask);
// Deletes itseft after execution
- return TRUE;
+ return true;
}
private:
@@ -85,19 +85,19 @@ LLSetKeyBindDialog::~LLSetKeyBindDialog()
}
//virtual
-BOOL LLSetKeyBindDialog::postBuild()
+bool LLSetKeyBindDialog::postBuild()
{
childSetAction("SetEmpty", onBlank, this);
childSetAction("Default", onDefault, this);
childSetAction("Cancel", onCancel, this);
- getChild<LLUICtrl>("Cancel")->setFocus(TRUE);
+ getChild<LLUICtrl>("Cancel")->setFocus(true);
pCheckBox = getChild<LLCheckBoxCtrl>("apply_all");
pDescription = getChild<LLTextBase>("description");
- gFocusMgr.setKeystrokesOnly(TRUE);
+ gFocusMgr.setKeystrokesOnly(true);
- return TRUE;
+ return true;
}
//virtual
@@ -162,7 +162,7 @@ void LLSetKeyBindDialog::setParent(LLKeyBindResponderInterface* parent, LLView*
}
// static
-bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, BOOL down)
+bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, bool down)
{
if (sRecordKeys)
{
@@ -180,7 +180,7 @@ bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, BOOL down)
return false;
}
-bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down)
+bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, bool down)
{
if ((key == 'Q' && mask == MASK_CONTROL)
|| key == KEY_ESCAPE)
@@ -214,7 +214,7 @@ bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down)
// Masks by themself are not allowed
return false;
}
- if (down == TRUE)
+ if (down)
{
// Most keys are handled on 'down' event because menu is handled on 'down'
// masks are exceptions to let other keys be handled
@@ -269,14 +269,14 @@ bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down)
return true;
}
-BOOL LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, BOOL down)
+bool LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down)
{
- BOOL result = FALSE;
+ bool result = false;
if (!pParent)
{
// we already processed 'down' event, this is 'up', consume
closeFloater();
- result = TRUE;
+ result = true;
}
if (!result && clicktype == CLICK_LEFT)
{
@@ -291,8 +291,8 @@ BOOL LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClic
}
if (result)
{
- setFocus(TRUE);
- gFocusMgr.setKeystrokesOnly(TRUE);
+ setFocus(true);
+ gFocusMgr.setKeystrokesOnly(true);
}
// ignore selection related combinations
else if (down && (mask & (MASK_SHIFT | MASK_CONTROL)) == 0)
@@ -302,7 +302,7 @@ BOOL LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClic
{
// Note: default doubleclick time is 500ms, but can stretch up to 5s
pUpdater = new Updater(boost::bind(&onClickTimeout, this, _1), 0.7f, mask);
- result = TRUE;
+ result = true;
}
}
}
@@ -314,7 +314,7 @@ BOOL LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClic
&& ((mKeyFilterMask & ALLOW_MASK_MOUSE) != 0 || mask == 0)) // reserved for selection
{
setKeyBind(clicktype, KEY_NONE, mask, pCheckBox->getValue().asBoolean());
- result = TRUE;
+ result = true;
if (!down)
{
// wait for 'up' event before closing