summaryrefslogtreecommitdiff
path: root/indra/llui/llmultislider.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-09-05 08:40:49 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-09-05 08:40:49 -0400
commit22a47eee84dbaa5c731c000c6013ca558bd15892 (patch)
tree8b3128fdb91731d95025b86701431826c441c5ba /indra/llui/llmultislider.cpp
parenta6b85244a6f943a4598ff9b7b8a3343eb1e0d11e (diff)
parent7ac4c3b56e5246fceaa73e7c9c665d3c04827d6c (diff)
Merge branch 'release/luau-scripting' into lua-resultset
Diffstat (limited to 'indra/llui/llmultislider.cpp')
-rw-r--r--indra/llui/llmultislider.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index 26882ba8ec..cfbf491610 100644
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -161,7 +161,7 @@ F32 LLMultiSlider::getNearestIncrement(F32 value) const
return mMinValue + value;
}
-void LLMultiSlider::setSliderValue(const std::string& name, F32 value, BOOL from_event)
+void LLMultiSlider::setSliderValue(const std::string& name, F32 value, bool from_event)
{
// exit if not there
if(!mValue.has(name)) {
@@ -263,7 +263,7 @@ void LLMultiSlider::setValue(const LLSD& value)
mCurSlider = mIt->first;
for(; mIt != value.endMap(); mIt++) {
- setSliderValue(mIt->first, (F32)mIt->second.asReal(), TRUE);
+ setSliderValue(mIt->first, (F32)mIt->second.asReal(), true);
}
}
}
@@ -378,7 +378,7 @@ const std::string& LLMultiSlider::addSlider(F32 val)
mCurSlider = newName.str();
// move the slider
- setSliderValue(mCurSlider, initVal, TRUE);
+ setSliderValue(mCurSlider, initVal, true);
return mCurSlider;
}
@@ -411,7 +411,7 @@ bool LLMultiSlider::addSlider(F32 val, const std::string& name)
mCurSlider = name;
// move the slider
- setSliderValue(mCurSlider, initVal, TRUE);
+ setSliderValue(mCurSlider, initVal, true);
return true;
}
@@ -498,7 +498,7 @@ void LLMultiSlider::clear()
LLF32UICtrl::clear();
}
-BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask)
+bool LLMultiSlider::handleHover(S32 x, S32 y, MASK mask)
{
if( gFocusMgr.getMouseCapture() == this )
{
@@ -531,12 +531,12 @@ BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask)
getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL;
}
- return TRUE;
+ return true;
}
-BOOL LLMultiSlider::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLMultiSlider::handleMouseUp(S32 x, S32 y, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
if( gFocusMgr.getMouseCapture() == this )
{
@@ -545,23 +545,23 @@ BOOL LLMultiSlider::handleMouseUp(S32 x, S32 y, MASK mask)
if (mMouseUpSignal)
(*mMouseUpSignal)( this, LLSD() );
- handled = TRUE;
+ handled = true;
make_ui_sound("UISndClickRelease");
}
else
{
- handled = TRUE;
+ handled = true;
}
return handled;
}
-BOOL LLMultiSlider::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLMultiSlider::handleMouseDown(S32 x, S32 y, MASK mask)
{
// only do sticky-focus on non-chrome widgets
if (!getIsChrome())
{
- setFocus(TRUE);
+ setFocus(true);
}
if (mMouseDownSignal)
(*mMouseDownSignal)( this, LLSD() );
@@ -611,28 +611,28 @@ BOOL LLMultiSlider::handleMouseDown(S32 x, S32 y, MASK mask)
}
make_ui_sound("UISndClick");
- return TRUE;
+ return true;
}
-BOOL LLMultiSlider::handleKeyHere(KEY key, MASK mask)
+bool LLMultiSlider::handleKeyHere(KEY key, MASK mask)
{
- BOOL handled = FALSE;
+ bool handled = false;
switch(key)
{
case KEY_UP:
case KEY_DOWN:
// eat up and down keys to be consistent
- handled = TRUE;
+ handled = true;
break;
case KEY_LEFT:
setCurSliderValue(getCurSliderValue() - getIncrement());
onCommit();
- handled = TRUE;
+ handled = true;
break;
case KEY_RIGHT:
setCurSliderValue(getCurSliderValue() + getIncrement());
onCommit();
- handled = TRUE;
+ handled = true;
break;
default:
break;
@@ -700,7 +700,7 @@ void LLMultiSlider::draw()
mIt->second.mTop + extra_triangle_height,
mIt->second.mLeft + mIt->second.getWidth() / 2,
mIt->second.mBottom - extra_triangle_height,
- mTriangleColor.get() % opacity, TRUE);
+ mTriangleColor.get() % opacity, true);
}
}
else if (!mRoundedSquareImgp && !mThumbImagep)
@@ -725,23 +725,23 @@ void LLMultiSlider::draw()
}
// the draw command
- gl_rect_2d(mIt->second, curThumbColor, TRUE);
+ gl_rect_2d(mIt->second, curThumbColor, true);
}
// now draw the current and hover sliders
if(curSldrIt != mThumbRects.end())
{
- gl_rect_2d(curSldrIt->second, mThumbCenterSelectedColor.get(), TRUE);
+ gl_rect_2d(curSldrIt->second, mThumbCenterSelectedColor.get(), true);
}
// and draw the drag start
if (gFocusMgr.getMouseCapture() == this)
{
- gl_rect_2d(mDragStartThumbRect, mThumbCenterColor.get() % opacity, FALSE);
+ gl_rect_2d(mDragStartThumbRect, mThumbCenterColor.get() % opacity, false);
}
else if (hoverSldrIt != mThumbRects.end())
{
- gl_rect_2d(hoverSldrIt->second, mThumbCenterSelectedColor.get(), TRUE);
+ gl_rect_2d(hoverSldrIt->second, mThumbCenterSelectedColor.get(), true);
}
}
else