summaryrefslogtreecommitdiff
path: root/indra/llui/llspinctrl.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/llui/llspinctrl.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/llui/llspinctrl.cpp')
-rw-r--r--indra/llui/llspinctrl.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index c411aafb1a..84ac3a8c0f 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -63,7 +63,7 @@ LLSpinCtrl::Params::Params()
LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p)
: LLF32UICtrl(p),
mLabelBox(NULL),
- mbHasBeenSet( FALSE ),
+ mbHasBeenSet( false ),
mPrecision(p.decimal_digits),
mTextEnabledColor(p.text_enabled_color()),
mTextDisabledColor(p.text_disabled_color())
@@ -143,12 +143,12 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p)
//RN: this seems to be a BAD IDEA, as it makes the editor behavior different when it has focus
// than when it doesn't. Instead, if you always have to double click to select all the text,
// it's easier to understand
- //mEditor->setSelectAllonFocusReceived(TRUE);
- mEditor->setSelectAllonCommit(FALSE);
+ //mEditor->setSelectAllonFocusReceived(true);
+ mEditor->setSelectAllonCommit(false);
addChild(mEditor);
updateEditor();
- setUseBoundingRect( TRUE );
+ setUseBoundingRect( true );
}
F32 clamp_precision(F32 value, S32 decimal_precision)
@@ -275,7 +275,7 @@ void LLSpinCtrl::setValue(const LLSD& value )
F32 v = (F32)value.asReal();
if (getValueF32() != v || !mbHasBeenSet)
{
- mbHasBeenSet = TRUE;
+ mbHasBeenSet = true;
LLF32UICtrl::setValue(value);
if (!mEditor->hasFocus())
@@ -291,7 +291,7 @@ void LLSpinCtrl::forceSetValue(const LLSD& value )
F32 v = (F32)value.asReal();
if (getValueF32() != v || !mbHasBeenSet)
{
- mbHasBeenSet = TRUE;
+ mbHasBeenSet = true;
LLF32UICtrl::setValue(value);
updateEditor();
@@ -303,7 +303,7 @@ void LLSpinCtrl::clear()
{
setValue(mMinValue);
mEditor->clear();
- mbHasBeenSet = FALSE;
+ mbHasBeenSet = false;
}
void LLSpinCtrl::updateLabelColor()
@@ -333,7 +333,7 @@ void LLSpinCtrl::updateEditor()
void LLSpinCtrl::onEditorCommit( const LLSD& data )
{
- BOOL success = FALSE;
+ bool success = false;
if( mEditor->evaluateFloat() )
{
@@ -349,7 +349,7 @@ void LLSpinCtrl::onEditorCommit( const LLSD& data )
setValue(val);
if( !mValidateSignal || (*mValidateSignal)( this, val ) )
{
- success = TRUE;
+ success = true;
onCommit();
}
else
@@ -378,13 +378,13 @@ void LLSpinCtrl::forceEditorCommit()
}
-void LLSpinCtrl::setFocus(BOOL b)
+void LLSpinCtrl::setFocus(bool b)
{
LLUICtrl::setFocus( b );
mEditor->setFocus( b );
}
-void LLSpinCtrl::setEnabled(BOOL b)
+void LLSpinCtrl::setEnabled(bool b)
{
LLView::setEnabled( b );
mEditor->setEnabled( b );
@@ -392,14 +392,14 @@ void LLSpinCtrl::setEnabled(BOOL b)
}
-void LLSpinCtrl::setTentative(BOOL b)
+void LLSpinCtrl::setTentative(bool b)
{
mEditor->setTentative(b);
LLUICtrl::setTentative(b);
}
-BOOL LLSpinCtrl::isMouseHeldDown() const
+bool LLSpinCtrl::isMouseHeldDown() const
{
return
mDownBtn->hasMouseCapture()
@@ -408,7 +408,7 @@ BOOL LLSpinCtrl::isMouseHeldDown() const
void LLSpinCtrl::onCommit()
{
- setTentative(FALSE);
+ setTentative(false);
setControlValue(getValueF32());
LLF32UICtrl::onCommit();
}
@@ -439,7 +439,7 @@ void LLSpinCtrl::setLabel(const LLStringExplicit& label)
updateLabelColor();
}
-void LLSpinCtrl::setAllowEdit(BOOL allow_edit)
+void LLSpinCtrl::setAllowEdit(bool allow_edit)
{
mEditor->setEnabled(allow_edit);
mAllowEdit = allow_edit;
@@ -457,7 +457,7 @@ void LLSpinCtrl::reportInvalidData()
make_ui_sound("UISndBadKeystroke");
}
-BOOL LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if( clicks > 0 )
{
@@ -472,10 +472,10 @@ BOOL LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks)
onUpBtn(getValue());
}
- return TRUE;
+ return true;
}
-BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
+bool LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
{
if (mEditor->hasFocus())
{
@@ -485,20 +485,20 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
// but not allowing revert on a spinner seems dangerous
updateEditor();
mEditor->resetScrollPosition();
- mEditor->setFocus(FALSE);
- return TRUE;
+ mEditor->setFocus(false);
+ return true;
}
if(key == KEY_UP)
{
onUpBtn(getValue());
- return TRUE;
+ return true;
}
if(key == KEY_DOWN)
{
onDownBtn(getValue());
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}