diff options
Diffstat (limited to 'indra/newview/llpaneleditwearable.cpp')
-rw-r--r-- | indra/newview/llpaneleditwearable.cpp | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index cb69f72288..d034a43453 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -344,40 +344,40 @@ LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls() LLEditWearableDictionary::TextureCtrls::TextureCtrls() { - addEntry ( TEX_HEAD_BODYPAINT, new PickerControlEntry (TEX_HEAD_BODYPAINT, "Head", LLUUID::null, TRUE )); - addEntry ( TEX_UPPER_BODYPAINT, new PickerControlEntry (TEX_UPPER_BODYPAINT, "Upper Body", LLUUID::null, TRUE )); - addEntry ( TEX_LOWER_BODYPAINT, new PickerControlEntry (TEX_LOWER_BODYPAINT, "Lower Body", LLUUID::null, TRUE )); - addEntry ( TEX_HAIR, new PickerControlEntry (TEX_HAIR, "Texture", LLUUID( gSavedSettings.getString( "UIImgDefaultHairUUID" ) ), FALSE )); - addEntry ( TEX_EYES_IRIS, new PickerControlEntry (TEX_EYES_IRIS, "Iris", LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultPantsUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShoesUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSocksUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Upper Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_JACKET, new PickerControlEntry (TEX_LOWER_JACKET, "Lower Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE )); - addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSkirtUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultGlovesUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_ALPHA, new PickerControlEntry (TEX_LOWER_ALPHA, "Lower Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_UPPER_ALPHA, new PickerControlEntry (TEX_UPPER_ALPHA, "Upper Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_HEAD_ALPHA, new PickerControlEntry (TEX_HEAD_ALPHA, "Head Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_EYES_ALPHA, new PickerControlEntry (TEX_EYES_ALPHA, "Eye Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_HAIR_ALPHA, new PickerControlEntry (TEX_HAIR_ALPHA, "Hair Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_LOWER_TATTOO, new PickerControlEntry (TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, TRUE )); - addEntry ( TEX_UPPER_TATTOO, new PickerControlEntry (TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, TRUE )); - addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry (TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, TRUE )); - addEntry ( TEX_LOWER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_LOWER_UNIVERSAL_TATTOO, "Lower Universal Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_UPPER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_UPPER_UNIVERSAL_TATTOO, "Upper Universal Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_HEAD_UNIVERSAL_TATTOO, "Head Universal Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_SKIRT_TATTOO, new PickerControlEntry(TEX_SKIRT_TATTOO, "Skirt Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_HAIR_TATTOO, new PickerControlEntry(TEX_HAIR_TATTOO, "Hair Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_EYES_TATTOO, new PickerControlEntry(TEX_EYES_TATTOO, "Eyes Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_LEFT_ARM_TATTOO, new PickerControlEntry(TEX_LEFT_ARM_TATTOO, "Left Arm Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, TRUE)); + addEntry ( TEX_HEAD_BODYPAINT, new PickerControlEntry (TEX_HEAD_BODYPAINT, "Head", LLUUID::null, true )); + addEntry ( TEX_UPPER_BODYPAINT, new PickerControlEntry (TEX_UPPER_BODYPAINT, "Upper Body", LLUUID::null, true )); + addEntry ( TEX_LOWER_BODYPAINT, new PickerControlEntry (TEX_LOWER_BODYPAINT, "Lower Body", LLUUID::null, true )); + addEntry ( TEX_HAIR, new PickerControlEntry (TEX_HAIR, "Texture", LLUUID( gSavedSettings.getString( "UIImgDefaultHairUUID" ) ), false )); + addEntry ( TEX_EYES_IRIS, new PickerControlEntry (TEX_EYES_IRIS, "Iris", LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ), false )); + addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ), false )); + addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultPantsUUID" ) ), false )); + addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShoesUUID" ) ), false )); + addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSocksUUID" ) ), false )); + addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Upper Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), false )); + addEntry ( TEX_LOWER_JACKET, new PickerControlEntry (TEX_LOWER_JACKET, "Lower Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), false )); + addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSkirtUUID" ) ), false )); + addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultGlovesUUID" ) ), false )); + addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), false )); + addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), false )); + addEntry ( TEX_LOWER_ALPHA, new PickerControlEntry (TEX_LOWER_ALPHA, "Lower Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), true )); + addEntry ( TEX_UPPER_ALPHA, new PickerControlEntry (TEX_UPPER_ALPHA, "Upper Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), true )); + addEntry ( TEX_HEAD_ALPHA, new PickerControlEntry (TEX_HEAD_ALPHA, "Head Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), true )); + addEntry ( TEX_EYES_ALPHA, new PickerControlEntry (TEX_EYES_ALPHA, "Eye Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), true )); + addEntry ( TEX_HAIR_ALPHA, new PickerControlEntry (TEX_HAIR_ALPHA, "Hair Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), true )); + addEntry ( TEX_LOWER_TATTOO, new PickerControlEntry (TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, true )); + addEntry ( TEX_UPPER_TATTOO, new PickerControlEntry (TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, true )); + addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry (TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, true )); + addEntry ( TEX_LOWER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_LOWER_UNIVERSAL_TATTOO, "Lower Universal Tattoo", LLUUID::null, true)); + addEntry ( TEX_UPPER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_UPPER_UNIVERSAL_TATTOO, "Upper Universal Tattoo", LLUUID::null, true)); + addEntry ( TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_HEAD_UNIVERSAL_TATTOO, "Head Universal Tattoo", LLUUID::null, true)); + addEntry ( TEX_SKIRT_TATTOO, new PickerControlEntry(TEX_SKIRT_TATTOO, "Skirt Tattoo", LLUUID::null, true)); + addEntry ( TEX_HAIR_TATTOO, new PickerControlEntry(TEX_HAIR_TATTOO, "Hair Tattoo", LLUUID::null, true)); + addEntry ( TEX_EYES_TATTOO, new PickerControlEntry(TEX_EYES_TATTOO, "Eyes Tattoo", LLUUID::null, true)); + addEntry (TEX_LEFT_ARM_TATTOO, new PickerControlEntry(TEX_LEFT_ARM_TATTOO, "Left Arm Tattoo", LLUUID::null, true)); + addEntry (TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, true)); + addEntry (TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, true)); + addEntry (TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, true)); + addEntry (TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, true)); } LLEditWearableDictionary::PickerControlEntry::PickerControlEntry(ETextureIndex tex_index, @@ -654,7 +654,7 @@ bool LLPanelEditWearable::changeHeightUnits(const LLSD& new_value) return true; } -void LLPanelEditWearable::updateMetricLayout(BOOL new_value) +void LLPanelEditWearable::updateMetricLayout(bool new_value) { LLUIString current_metric, replacment_metric; current_metric = new_value ? mMeters : mFeet; @@ -707,7 +707,7 @@ void LLPanelEditWearable::setWearablePanelVisibilityChangeCallback(LLPanel* body } // virtual -BOOL LLPanelEditWearable::postBuild() +bool LLPanelEditWearable::postBuild() { // buttons mBtnRevert = getChild<LLButton>("revert_button"); @@ -824,20 +824,20 @@ BOOL LLPanelEditWearable::postBuild() gSavedSettings.getControl("HeightUnits")->getSignal()->connect(boost::bind(&LLPanelEditWearable::changeHeightUnits, this, _2)); updateMetricLayout(gSavedSettings.getBOOL("HeightUnits")); - return TRUE; + return true; } // virtual // LLUICtrl -BOOL LLPanelEditWearable::isDirty() const +bool LLPanelEditWearable::isDirty() const { - BOOL isDirty = FALSE; + bool isDirty = false; if (mWearablePtr) { if (mWearablePtr->isDirty() || ( mWearableItem && mNameEditor && mWearableItem->getName().compare(mNameEditor->getText()) != 0 )) { - isDirty = TRUE; + isDirty = true; } } return isDirty; @@ -861,20 +861,20 @@ void LLPanelEditWearable::onClose() revertChanges(); } -void LLPanelEditWearable::setVisible(BOOL visible) +void LLPanelEditWearable::setVisible(bool visible) { if (!visible) { - showWearable(mWearablePtr, FALSE); + showWearable(mWearablePtr, false); } LLPanel::setVisible(visible); } -void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, BOOL disable_camera_switch) +void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, bool disable_camera_switch) { - showWearable(mWearablePtr, FALSE, disable_camera_switch); + showWearable(mWearablePtr, false, disable_camera_switch); mWearablePtr = wearable; - showWearable(mWearablePtr, TRUE, disable_camera_switch); + showWearable(mWearablePtr, true, disable_camera_switch); } //static @@ -946,7 +946,7 @@ void LLPanelEditWearable::onCommitSexChange() gAgentAvatarp->updateSexDependentLayerSets(); gAgentAvatarp->updateVisualParams(); - showWearable(mWearablePtr, TRUE, TRUE); + showWearable(mWearablePtr, true, true); updateScrollingPanelUI(); } @@ -978,7 +978,7 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl) U32 index; if (gAgentWearables.getWearableIndex(getWearable(), index)) { - gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index); + gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, false, index); LLVisualParamHint::requestHintUpdates(); gAgentAvatarp->wearableUpdated(type); } @@ -1089,7 +1089,7 @@ void LLPanelEditWearable::saveChanges(bool force_save_as) { // the name of the wearable has changed, re-save wearable with new name LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID(),gAgentAvatarp->mEndCustomizeCallback); - gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, FALSE); + gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, false); mNameEditor->setText(mWearableItem->getName()); } else @@ -1133,7 +1133,7 @@ void LLPanelEditWearable::revertChanges() gAgentAvatarp->wearableUpdated(mWearablePtr->getType()); } -void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BOOL disable_camera_switch) +void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, bool show, bool disable_camera_switch) { if (!wearable) { @@ -1215,12 +1215,12 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO // Don't show female subparts if you're not female, etc. if (!(gAgentAvatarp->getSex() & subpart_entry->mSex)) { - tab->setVisible(FALSE); + tab->setVisible(false); continue; } else { - tab->setVisible(TRUE); + tab->setVisible(true); } // what edit group do we want to extract params for? @@ -1308,7 +1308,7 @@ void LLPanelEditWearable::changeCamera(U8 subpart) if (gSavedSettings.getBOOL("AppearanceCameraMovement")) { // Unlock focus from avatar but don't stop animation to not interrupt ANIM_AGENT_CUSTOMIZE - gAgentCamera.setFocusOnAvatar(FALSE, gAgentCamera.getCameraAnimating()); + gAgentCamera.setFocusOnAvatar(false, gAgentCamera.getCameraAnimating()); gMorphView->updateCamera(); } } @@ -1338,7 +1338,7 @@ void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type) { // Update avatar height F32 new_size = gAgentAvatarp->mBodySize.mV[VZ]; - if (gSavedSettings.getBOOL("HeightUnits") == FALSE) + if (gSavedSettings.getBOOL("HeightUnits") == false) { // convert meters to feet new_size = new_size / ONE_FOOT; @@ -1392,7 +1392,7 @@ void LLPanelEditWearable::updateScrollingPanelUI() continue; } - panel_list->updatePanels(TRUE); + panel_list->updatePanels(true); } } } @@ -1519,11 +1519,11 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value LLScrollingPanelParamBase *panel_param = NULL; if (wearable && wearable->getType() == LLWearableType::WT_PHYSICS) // Hack to show a different panel for physics. Should generalize this later. { - panel_param = new LLScrollingPanelParamBase( p, NULL, (*it).second, TRUE, this->getWearable(), jointp); + panel_param = new LLScrollingPanelParamBase( p, NULL, (*it).second, true, this->getWearable(), jointp); } else { - panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable(), jointp); + panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, true, this->getWearable(), jointp); } panel_list->addPanel( panel_param ); } @@ -1539,7 +1539,7 @@ void LLPanelEditWearable::updateVerbs() can_copy = mWearableItem->getPermissions().allowCopyBy(gAgentID); } - BOOL is_dirty = isDirty(); + bool is_dirty = isDirty(); mBtnRevert->setEnabled(is_dirty); getChildView("save_as_button")->setEnabled(is_dirty && can_copy); @@ -1552,7 +1552,7 @@ void LLPanelEditWearable::updateVerbs() } // update back button and title according to dirty state. - static BOOL was_dirty = FALSE; + static bool was_dirty = false; if (was_dirty != is_dirty) // to avoid redundant changes because this method is called from draw { static S32 label_width = mBtnBack->getFont()->getWidth(mBackBtnLabel); @@ -1603,7 +1603,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL mPreviousAlphaTexture[te] = lto->getID(); LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture( IMG_INVISIBLE ); - gAgentAvatarp->setLocalTexture(te, image, FALSE, index); + gAgentAvatarp->setLocalTexture(te, image, false, index); gAgentAvatarp->wearableUpdated(getWearable()->getType()); } else @@ -1619,7 +1619,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(prev_id); if (!image) return; - gAgentAvatarp->setLocalTexture(te, image, FALSE, index); + gAgentAvatarp->setLocalTexture(te, image, false, index); gAgentAvatarp->wearableUpdated(getWearable()->getType()); } @@ -1666,8 +1666,8 @@ public: bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web) { - // change height units TRUE for meters and FALSE for feet - BOOL new_value = (gSavedSettings.getBOOL("HeightUnits") == FALSE) ? TRUE : FALSE; + // change height units true for meters and false for feet + bool new_value = (gSavedSettings.getBOOL("HeightUnits") == false) ? true : false; gSavedSettings.setBOOL("HeightUnits", new_value); return true; } |