diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-06-12 17:04:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 17:04:34 -0700 |
commit | 100ebbab2437de7f5d124a0d7b8279a7a7b57656 (patch) | |
tree | e8b4200dae16e89698c2f3eadae05634041681a1 /indra/newview/llsplitbutton.cpp | |
parent | f5e2708a0fc4e08d3d0a5dc393bbd4bac09e1c55 (diff) | |
parent | ae74ca80692c8bcf157e903033fcfa1778706d64 (diff) |
Merge pull request #1745 from secondlife/project/gltf_development
move project/gltf development to develop
Diffstat (limited to 'indra/newview/llsplitbutton.cpp')
-rw-r--r-- | indra/newview/llsplitbutton.cpp | 32 |
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); |