summaryrefslogtreecommitdiff
path: root/indra/newview/llsetkeybinddialog.cpp
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-05-06 15:44:19 -0700
committerGitHub <noreply@github.com>2024-05-06 15:44:19 -0700
commit84827a7cb8d4b7a58309f98c7d4df4cfeb173935 (patch)
treeb91494298eab93bbd8dd9b00722b7a30714a1b9c /indra/newview/llsetkeybinddialog.cpp
parent76101843c0d390c25a783f212eb1ea75e508ada4 (diff)
parent8b747cee182cd8e95063fa152d9b5d7383cb1c74 (diff)
Merge pull request #1413 from secondlife/gltf-dev-maint-a-merge
Merge Maint A to development
Diffstat (limited to 'indra/newview/llsetkeybinddialog.cpp')
-rw-r--r--indra/newview/llsetkeybinddialog.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp
index 74844a80e8..1e5a67302a 100644
--- a/indra/newview/llsetkeybinddialog.cpp
+++ b/indra/newview/llsetkeybinddialog.cpp
@@ -53,11 +53,11 @@ public:
virtual ~Updater(){}
protected:
- BOOL tick()
+ bool tick()
{
mCallback(mMask);
// Deletes itseft after execution
- return TRUE;
+ return true;
}
private:
@@ -88,19 +88,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
@@ -165,7 +165,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)
{
@@ -183,7 +183,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)
@@ -217,7 +217,7 @@ bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down)
// Masks by themself are not allowed
return false;
}
- if (down == TRUE)
+ if (down == true)
{
// Most keys are handled on 'down' event because menu is handled on 'down'
// masks are exceptions to let other keys be handled
@@ -272,14 +272,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)
{
@@ -294,8 +294,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)
@@ -305,7 +305,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;
}
}
}
@@ -317,7 +317,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