diff options
Diffstat (limited to 'indra/llui/llsliderctrl.cpp')
-rw-r--r-- | indra/llui/llsliderctrl.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index e16ba9408e..66e97f093f 100644 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -173,7 +173,7 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p) mEditor->setFocusReceivedCallback( boost::bind(&LLSliderCtrl::onEditorGainFocus, _1, this )); // don't do this, as selecting the entire text is single clicking in some cases // and double clicking in others - //mEditor->setSelectAllonFocusReceived(TRUE); + //mEditor->setSelectAllonFocusReceived(true); addChild(mEditor); } else @@ -210,22 +210,22 @@ void LLSliderCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata } -void LLSliderCtrl::setValue(F32 v, BOOL from_event) +void LLSliderCtrl::setValue(F32 v, bool from_event) { mSlider->setValue( v, from_event ); mValue = mSlider->getValueF32(); updateText(); } -BOOL LLSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text ) +bool LLSliderCtrl::setLabelArg( const std::string& key, const LLStringExplicit& text ) { - BOOL res = FALSE; + bool res = false; if (mLabelBox) { res = mLabelBox->setTextArg(key, text); if (res && mLabelFont && mLabelWidth == 0) { - S32 label_width = mLabelFont->getWidth(mLabelBox->getText()); + S32 label_width = mLabelFont->getWidth(mLabelBox->getWText().c_str()); LLRect rect = mLabelBox->getRect(); S32 prev_right = rect.mRight; rect.mRight = rect.mLeft + label_width; @@ -319,7 +319,7 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata ) if (!self) return; - BOOL success = FALSE; + bool success = false; F32 val = self->mValue; F32 saved_val = self->mValue; @@ -333,7 +333,7 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata ) self->setValue( val ); // set the value temporarily so that the callback can retrieve it. if( !self->mValidateSignal || (*(self->mValidateSignal))( self, val ) ) { - success = TRUE; + success = true; } } } @@ -362,14 +362,14 @@ void LLSliderCtrl::onSliderCommit( LLUICtrl* ctrl, const LLSD& userdata ) if (!self) return; - BOOL success = FALSE; + bool success = false; F32 saved_val = self->mValue; F32 new_val = self->mSlider->getValueF32(); self->mValue = new_val; // set the value temporarily so that the callback can retrieve it. if( !self->mValidateSignal || (*(self->mValidateSignal))( self, new_val ) ) { - success = TRUE; + success = true; } if( success ) @@ -387,13 +387,13 @@ void LLSliderCtrl::onSliderCommit( LLUICtrl* ctrl, const LLSD& userdata ) self->updateText(); } -void LLSliderCtrl::setEnabled(BOOL b) +void LLSliderCtrl::setEnabled(bool b) { LLView::setEnabled( b ); if( mLabelBox ) { - mLabelBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() ); + mLabelBox->setColor( b ? mTextEnabledColor : mTextDisabledColor ); } mSlider->setEnabled( b ); @@ -405,12 +405,12 @@ void LLSliderCtrl::setEnabled(BOOL b) if( mTextBox ) { - mTextBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() ); + mTextBox->setColor( b ? mTextEnabledColor : mTextDisabledColor ); } } -void LLSliderCtrl::setTentative(BOOL b) +void LLSliderCtrl::setTentative(bool b) { if( mEditor ) { @@ -422,11 +422,11 @@ void LLSliderCtrl::setTentative(BOOL b) void LLSliderCtrl::onCommit() { - setTentative(FALSE); + setTentative(false); if( mEditor ) { - mEditor->setTentative(FALSE); + mEditor->setTentative(false); } setControlValue(getValueF32()); @@ -440,7 +440,7 @@ void LLSliderCtrl::setRect(const LLRect& rect) } //virtual -void LLSliderCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLSliderCtrl::reshape(S32 width, S32 height, bool called_from_parent) { LLF32UICtrl::reshape(width, height, called_from_parent); updateSliderRect(); |