summaryrefslogtreecommitdiff
path: root/indra/llui/llspinctrl.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-08-28 20:47:43 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-08-28 20:47:43 -0400
commitcde1174345224d33d6b45b1e3243fa39043223e5 (patch)
tree6c8db6e0499622d8c7206a11c997eb173ebd478f /indra/llui/llspinctrl.cpp
parent6f454ad8366ed33bbe199c3fc3ed69e6d3448cec (diff)
parent35efadf78315f9b351415930dca4fae251ef4dd0 (diff)
Merge branch 'main' into release/luau-scripting.
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 888edd093e..7d41d80334 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;
}