summaryrefslogtreecommitdiff
path: root/indra/newview/llsplitbutton.cpp
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2024-09-05 08:37:16 -0400
committerGitHub <noreply@github.com>2024-09-05 08:37:16 -0400
commit7ac4c3b56e5246fceaa73e7c9c665d3c04827d6c (patch)
treee96334bd9299102ebdaf229eec9cf4c2165f8c2f /indra/newview/llsplitbutton.cpp
parent487973d3f0ee9b8583b3d977ca6a405cba5fe518 (diff)
parent6a747e1ce027700a3609f4c377179bfa29c3ce31 (diff)
Merge pull request #2450 from secondlife/lua-merge
Merge updated 'main' branch into release/luau-scripting
Diffstat (limited to 'indra/newview/llsplitbutton.cpp')
-rw-r--r--indra/newview/llsplitbutton.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp
index 5e363b358a..6c252ed31f 100644
--- a/indra/newview/llsplitbutton.cpp
+++ b/indra/newview/llsplitbutton.cpp
@@ -67,7 +67,7 @@ void LLSplitButton::onFocusLost()
LLUICtrl::onFocusLost();
}
-void LLSplitButton::setFocus(BOOL b)
+void LLSplitButton::setFocus(bool b)
{
LLUICtrl::setFocus(b);
@@ -75,12 +75,12 @@ void LLSplitButton::setFocus(BOOL b)
{
if (mItemsPanel && mItemsPanel->getVisible())
{
- mItemsPanel->setFocus(TRUE);
+ mItemsPanel->setFocus(true);
}
}
}
-void LLSplitButton::setEnabled(BOOL enabled)
+void LLSplitButton::setEnabled(bool enabled)
{
LLView::setEnabled(enabled);
mArrowBtn->setEnabled(enabled);
@@ -93,7 +93,7 @@ void LLSplitButton::onArrowBtnDown()
{
showButtons();
- setFocus(TRUE);
+ setFocus(true);
if (mArrowBtn->hasMouseCapture() || mShownItem->hasMouseCapture())
{
@@ -126,14 +126,14 @@ void LLSplitButton::onItemSelected(LLUICtrl* ctrl)
gFocusMgr.setKeyboardFocus(NULL);
}
-BOOL LLSplitButton::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLSplitButton::handleMouseUp(S32 x, S32 y, MASK mask)
{
gFocusMgr.setMouseCapture(NULL);
if (mShownItem->parentPointInView(x, y))
{
onItemSelected(mShownItem);
- return TRUE;
+ return true;
}
for (std::list<LLButton*>::const_iterator it = mHidenItems.begin(); it != mHidenItems.end(); ++it)
@@ -147,10 +147,10 @@ BOOL LLSplitButton::handleMouseUp(S32 x, S32 y, MASK mask)
if (item->parentPointInView(panel_x, panel_y))
{
onItemSelected(item);
- return TRUE;
+ return true;
}
}
- return TRUE;
+ return true;
}
void LLSplitButton::showButtons()
@@ -161,21 +161,21 @@ void LLSplitButton::showButtons()
// effectively putting us into a special draw layer
gViewerWindow->addPopup(this);
- mItemsPanel->setFocus(TRUE);
+ mItemsPanel->setFocus(true);
//push arrow button down and show the item buttons
- mArrowBtn->setToggleState(TRUE);
- mItemsPanel->setVisible(TRUE);
+ mArrowBtn->setToggleState(true);
+ mItemsPanel->setVisible(true);
- setUseBoundingRect(TRUE);
+ setUseBoundingRect(true);
}
void LLSplitButton::hideButtons()
{
- mItemsPanel->setVisible(FALSE);
- mArrowBtn->setToggleState(FALSE);
+ mItemsPanel->setVisible(false);
+ mArrowBtn->setToggleState(false);
- setUseBoundingRect(FALSE);
+ setUseBoundingRect(false);
gViewerWindow->removePopup(this);
}
@@ -216,7 +216,7 @@ LLSplitButton::LLSplitButton(const LLSplitButton::Params& p)
//a panel for hidden item buttons
LLPanel::Params panel_params = p.items_panel;
- mItemsPanel= prepareItemsPanel(panel_params, p.items.numValidElements());
+ mItemsPanel= prepareItemsPanel(panel_params, static_cast<S32>(p.items.numValidElements()));
addChild(mItemsPanel);