diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-05-06 15:44:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-06 15:44:19 -0700 |
commit | 84827a7cb8d4b7a58309f98c7d4df4cfeb173935 (patch) | |
tree | b91494298eab93bbd8dd9b00722b7a30714a1b9c /indra/newview/llfloatertools.cpp | |
parent | 76101843c0d390c25a783f212eb1ea75e508ada4 (diff) | |
parent | 8b747cee182cd8e95063fa152d9b5d7383cb1c74 (diff) |
Merge pull request #1413 from secondlife/gltf-dev-maint-a-merge
Merge Maint A to development
Diffstat (limited to 'indra/newview/llfloatertools.cpp')
-rw-r--r-- | indra/newview/llfloatertools.cpp | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 5fb4fb9b07..31d9ada678 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -217,10 +217,10 @@ LLPCode toolData[]={ LL_PCODE_LEGACY_TREE, LL_PCODE_LEGACY_GRASS}; -BOOL LLFloaterTools::postBuild() +bool LLFloaterTools::postBuild() { // Hide until tool selected - setVisible(FALSE); + setVisible(false); // Since we constantly show and hide this during drags, don't // make sounds on visibility changes. @@ -243,13 +243,13 @@ BOOL LLFloaterTools::postBuild() mBtnUnlink = getChild<LLButton>("unlink_btn"); mCheckSelectIndividual = getChild<LLCheckBoxCtrl>("checkbox edit linked parts"); - getChild<LLUICtrl>("checkbox edit linked parts")->setValue((BOOL)gSavedSettings.getBOOL("EditLinkedParts")); + getChild<LLUICtrl>("checkbox edit linked parts")->setValue((bool)gSavedSettings.getBOOL("EditLinkedParts")); mCheckSnapToGrid = getChild<LLCheckBoxCtrl>("checkbox snap to grid"); - getChild<LLUICtrl>("checkbox snap to grid")->setValue((BOOL)gSavedSettings.getBOOL("SnapEnabled")); + getChild<LLUICtrl>("checkbox snap to grid")->setValue((bool)gSavedSettings.getBOOL("SnapEnabled")); mCheckStretchUniform = getChild<LLCheckBoxCtrl>("checkbox uniform"); - getChild<LLUICtrl>("checkbox uniform")->setValue((BOOL)gSavedSettings.getBOOL("ScaleUniform")); + getChild<LLUICtrl>("checkbox uniform")->setValue((bool)gSavedSettings.getBOOL("ScaleUniform")); mCheckStretchTexture = getChild<LLCheckBoxCtrl>("checkbox stretch textures"); - getChild<LLUICtrl>("checkbox stretch textures")->setValue((BOOL)gSavedSettings.getBOOL("ScaleStretchTextures")); + getChild<LLUICtrl>("checkbox stretch textures")->setValue((bool)gSavedSettings.getBOOL("ScaleStretchTextures")); mComboGridMode = getChild<LLComboBox>("combobox grid mode"); // @@ -268,13 +268,13 @@ BOOL LLFloaterTools::postBuild() } } mCheckCopySelection = getChild<LLCheckBoxCtrl>("checkbox copy selection"); - getChild<LLUICtrl>("checkbox copy selection")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolCopySelection")); + getChild<LLUICtrl>("checkbox copy selection")->setValue((bool)gSavedSettings.getBOOL("CreateToolCopySelection")); mCheckSticky = getChild<LLCheckBoxCtrl>("checkbox sticky"); - getChild<LLUICtrl>("checkbox sticky")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolKeepSelected")); + getChild<LLUICtrl>("checkbox sticky")->setValue((bool)gSavedSettings.getBOOL("CreateToolKeepSelected")); mCheckCopyCenters = getChild<LLCheckBoxCtrl>("checkbox copy centers"); - getChild<LLUICtrl>("checkbox copy centers")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolCopyCenters")); + getChild<LLUICtrl>("checkbox copy centers")->setValue((bool)gSavedSettings.getBOOL("CreateToolCopyCenters")); mCheckCopyRotates = getChild<LLCheckBoxCtrl>("checkbox copy rotates"); - getChild<LLUICtrl>("checkbox copy rotates")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolCopyRotates")); + getChild<LLUICtrl>("checkbox copy rotates")->setValue((bool)gSavedSettings.getBOOL("CreateToolCopyRotates")); mRadioGroupLand = getChild<LLRadioGroup>("land_radio_group"); mBtnApplyToSelection = getChild<LLButton>("button apply to selection"); @@ -290,7 +290,7 @@ BOOL LLFloaterTools::postBuild() if(mTab) { mTab->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT); - mTab->setBorderVisible(FALSE); + mTab->setBorderVisible(false); mTab->selectFirstTab(); } @@ -305,7 +305,7 @@ BOOL LLFloaterTools::postBuild() sShowObjectCost = gSavedSettings.getBOOL("ShowObjectRenderingCost"); - return TRUE; + return true; } // Create the popupview with a dummy center. It will be moved into place @@ -365,12 +365,12 @@ LLFloaterTools::LLFloaterTools(const LLSD& key) mLandImpactsObserver(NULL), - mDirty(TRUE), - mHasSelection(TRUE) + mDirty(true), + mHasSelection(true) { gFloaterTools = this; - setAutoFocus(FALSE); + setAutoFocus(false); mFactoryMap["General"] = LLCallbackMap(createPanelPermissions, this);//LLPanelPermissions mFactoryMap["Object"] = LLCallbackMap(createPanelObject, this);//LLPanelObject mFactoryMap["Features"] = LLCallbackMap(createPanelVolume, this);//LLPanelVolume @@ -425,7 +425,7 @@ void LLFloaterTools::refresh() const S32 INFO_WIDTH = getRect().getWidth(); const S32 INFO_HEIGHT = 384; LLRect object_info_rect(0, 0, INFO_WIDTH, -INFO_HEIGHT); - BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); + bool all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); S32 idx_features = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_FEATURES]); S32 idx_face = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_FACE]); @@ -560,17 +560,17 @@ void LLFloaterTools::refresh() void LLFloaterTools::draw() { - BOOL has_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty(); + bool has_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty(); if(!has_selection && (mHasSelection != has_selection)) { - mDirty = TRUE; + mDirty = true; } mHasSelection = has_selection; if (mDirty) { refresh(); - mDirty = FALSE; + mDirty = false; } // mCheckSelectIndividual->set(gSavedSettings.getBOOL("EditLinkedParts")); @@ -579,7 +579,7 @@ void LLFloaterTools::draw() void LLFloaterTools::dirty() { - mDirty = TRUE; + mDirty = true; LLFloaterOpenObject* instance = LLFloaterReg::findTypedInstance<LLFloaterOpenObject>("openobject"); if (instance) instance->dirty(); } @@ -588,12 +588,12 @@ void LLFloaterTools::dirty() // floater is closed. void LLFloaterTools::resetToolState() { - gCameraBtnZoom = TRUE; - gCameraBtnOrbit = FALSE; - gCameraBtnPan = FALSE; + gCameraBtnZoom = true; + gCameraBtnOrbit = false; + gCameraBtnPan = false; - gGrabBtnSpin = FALSE; - gGrabBtnVertical = FALSE; + gGrabBtnSpin = false; + gGrabBtnVertical = false; } void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) @@ -613,7 +613,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) } // Focus buttons - BOOL focus_visible = ( tool == LLToolCamera::getInstance() ); + bool focus_visible = ( tool == LLToolCamera::getInstance() ); mBtnFocus ->setToggleState( focus_visible ); @@ -647,7 +647,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) getChild<LLUICtrl>("slider zoom")->setValue(gAgentCamera.getCameraZoomFraction() * 0.5f); // Move buttons - BOOL move_visible = (tool == LLToolGrab::getInstance()); + bool move_visible = (tool == LLToolGrab::getInstance()); if (mBtnMove) mBtnMove ->setToggleState( move_visible ); @@ -672,7 +672,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) } // Edit buttons - BOOL edit_visible = tool == LLToolCompTranslate::getInstance() || + bool edit_visible = tool == LLToolCompTranslate::getInstance() || tool == LLToolCompRotate::getInstance() || tool == LLToolCompScale::getInstance() || tool == LLToolFace::getInstance() || @@ -750,7 +750,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) if (mCheckStretchUniformLabel) mCheckStretchUniformLabel->setVisible( edit_visible ); // Create buttons - BOOL create_visible = (tool == LLToolCompCreate::getInstance()); + bool create_visible = (tool == LLToolCompCreate::getInstance()); mBtnCreate ->setToggleState( tool == LLToolCompCreate::getInstance() ); @@ -760,7 +760,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) // don't highlight any placer button for (std::vector<LLButton*>::size_type i = 0; i < mButtons.size(); i++) { - mButtons[i]->setToggleState(FALSE); + mButtons[i]->setToggleState(false); mButtons[i]->setVisible( create_visible ); } } @@ -771,7 +771,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) { LLPCode pcode = LLToolPlacer::getObjectType(); LLPCode button_pcode = toolData[t]; - BOOL state = (pcode == button_pcode); + bool state = (pcode == button_pcode); mButtons[t]->setToggleState( state ); mButtons[t]->setVisible( create_visible ); } @@ -786,7 +786,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) if (mCheckCopyRotates && mCheckCopySelection) mCheckCopyRotates->setEnabled( mCheckCopySelection->get() ); // Land buttons - BOOL land_visible = (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance() ); + bool land_visible = (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance() ); mCostTextBorder->setVisible(!land_visible); @@ -855,7 +855,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) // virtual -BOOL LLFloaterTools::canClose() +bool LLFloaterTools::canClose() { // don't close when quitting, so camera will stay put return !LLApp::isExiting(); @@ -881,17 +881,17 @@ void LLFloaterTools::onOpen(const LLSD& key) // so it won't be getting any layout or visibility updates, update once // further updates will come from updateLayout() LLCoordGL select_center_screen; - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); updatePopup(select_center_screen, mask); } - //gMenuBarView->setItemVisible("BuildTools", TRUE); + //gMenuBarView->setItemVisible("BuildTools", true); } // virtual void LLFloaterTools::onClose(bool app_quitting) { - mTab->setVisible(FALSE); + mTab->setVisible(false); LLViewerJoystick::getInstance()->moveAvatar(false); @@ -904,7 +904,7 @@ void LLFloaterTools::onClose(bool app_quitting) // exit component selection mode LLSelectMgr::getInstance()->promoteSelectionToRoot(); - gSavedSettings.setBOOL("EditLinkedParts", FALSE); + gSavedSettings.setBOOL("EditLinkedParts", false); gViewerWindow->showCursor(); @@ -919,7 +919,7 @@ void LLFloaterTools::onClose(bool app_quitting) // so manually reset tool to default (pie menu tool) LLToolMgr::getInstance()->getCurrentToolset()->selectFirstTool(); - //gMenuBarView->setItemVisible("BuildTools", FALSE); + //gMenuBarView->setItemVisible("BuildTools", false); LLFloaterReg::hideInstance("media_settings"); // hide the advanced object weights floater @@ -934,7 +934,7 @@ void LLFloaterTools::onClose(bool app_quitting) if(sPreviousFocusOnAvatar) { sPreviousFocusOnAvatar = false; - gAgentCamera.setAllowChangeToFollow(TRUE); + gAgentCamera.setAllowChangeToFollow(true); } } @@ -953,18 +953,18 @@ void commit_radio_group_move(LLUICtrl* ctrl) std::string selected = group->getValue().asString(); if (selected == "radio move") { - gGrabBtnVertical = FALSE; - gGrabBtnSpin = FALSE; + gGrabBtnVertical = false; + gGrabBtnSpin = false; } else if (selected == "radio lift") { - gGrabBtnVertical = TRUE; - gGrabBtnSpin = FALSE; + gGrabBtnVertical = true; + gGrabBtnSpin = false; } else if (selected == "radio spin") { - gGrabBtnVertical = FALSE; - gGrabBtnSpin = TRUE; + gGrabBtnVertical = false; + gGrabBtnSpin = true; } } @@ -974,21 +974,21 @@ void commit_radio_group_focus(LLUICtrl* ctrl) std::string selected = group->getValue().asString(); if (selected == "radio zoom") { - gCameraBtnZoom = TRUE; - gCameraBtnOrbit = FALSE; - gCameraBtnPan = FALSE; + gCameraBtnZoom = true; + gCameraBtnOrbit = false; + gCameraBtnPan = false; } else if (selected == "radio orbit") { - gCameraBtnZoom = FALSE; - gCameraBtnOrbit = TRUE; - gCameraBtnPan = FALSE; + gCameraBtnZoom = false; + gCameraBtnOrbit = true; + gCameraBtnPan = false; } else if (selected == "radio pan") { - gCameraBtnZoom = FALSE; - gCameraBtnOrbit = FALSE; - gCameraBtnPan = TRUE; + gCameraBtnZoom = false; + gCameraBtnOrbit = false; + gCameraBtnPan = true; } } @@ -1074,7 +1074,7 @@ void commit_select_component(void *data) gFocusMgr.setKeyboardFocus(NULL); } - BOOL select_individuals = floaterp->mCheckSelectIndividual->get(); + bool select_individuals = floaterp->mCheckSelectIndividual->get(); gSavedSettings.setBOOL("EditLinkedParts", select_individuals); floaterp->dirty(); @@ -1092,7 +1092,7 @@ void commit_select_component(void *data) void LLFloaterTools::setObjectType( LLPCode pcode ) { LLToolPlacer::setObjectType( pcode ); - gSavedSettings.setBOOL("CreateToolCopySelection", FALSE); + gSavedSettings.setBOOL("CreateToolCopySelection", false); gFocusMgr.setMouseCapture(NULL); } |