summaryrefslogtreecommitdiff
path: root/indra/llui/llspinctrl.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-08-13 15:32:47 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-08-13 15:32:47 -0400
commit23f2631d598b6e07450a96ed1ec00670c8867cdd (patch)
tree20195c1688ad8cb7e8631c97fa5920624f10972c /indra/llui/llspinctrl.cpp
parent54334ff6e377e35c97df3a0fe2a859795ec07b21 (diff)
parent8ce3323269d95f54e2b768c4c5aa154d4afbbb6b (diff)
Merge branch 'develop' into nat/edu-channel
Diffstat (limited to 'indra/llui/llspinctrl.cpp')
-rw-r--r--indra/llui/llspinctrl.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index 888edd093e..8cd3e6419a 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,14 +303,14 @@ void LLSpinCtrl::clear()
{
setValue(mMinValue);
mEditor->clear();
- mbHasBeenSet = FALSE;
+ mbHasBeenSet = false;
}
void LLSpinCtrl::updateLabelColor()
{
if( mLabelBox )
{
- mLabelBox->setColor( getEnabled() ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+ mLabelBox->setColor( getEnabled() ? mTextEnabledColor : mTextDisabledColor );
}
}
@@ -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;
}