diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-25 20:17:23 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-25 20:17:23 -0400 |
commit | b524aacb599b8c907e02eeb56b7441f42e9ddad2 (patch) | |
tree | c4c30605a8f44593f8614b757404f499758b753f /indra | |
parent | 35f585ec7a7ca7982fa33eefb383ef3f0316ea5f (diff) |
EXT-7213 WIP kill old appearance editor and all traces of code
First pass - eliminated all references to gFloaterCustomize except
those that call saveIfDirty. Haven't compiled, haven't reviewed.
Will clean up in further patches and get reviewed before pushing.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llagentcamera.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llpaneleditwearable.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpaneleditwearable.h | 2 | ||||
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llsidepanelappearance.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llwearable.cpp | 16 |
9 files changed, 41 insertions, 37 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 9638d0e94f..d9eceec30d 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1538,26 +1538,6 @@ F32 LLAgentCamera::calcCustomizeAvatarUIOffset(const LLVector3d& camera_pos_glob { F32 ui_offset = 0.f; - if (gFloaterCustomize) - { - const LLRect& rect = gFloaterCustomize->getRect(); - - // Move the camera so that the avatar isn't covered up by this floater. - F32 fraction_of_fov = 0.5f - (0.5f * (1.f - llmin(1.f, ((F32)rect.getWidth() / (F32)gViewerWindow->getWindowWidthScaled())))); - F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect(); // radians - F32 offset = tan(apparent_angle); - - if( rect.mLeft < (gViewerWindow->getWindowWidthScaled() - rect.mRight) ) - { - // Move the avatar to the right (camera to the left) - ui_offset = offset; - } - else - { - // Move the avatar to the left (camera to the right) - ui_offset = -offset; - } - } F32 range = (F32)dist_vec(camera_pos_global, getFocusGlobal()); mUIOffset = lerp(mUIOffset, ui_offset, LLCriticalDamp::getInterpolant(0.05f)); return mUIOffset * range; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 0f532236e4..7625a7ab83 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -62,6 +62,7 @@ #include "llpreviewgesture.h" #include "llpreviewtexture.h" #include "llselectmgr.h" +#include "llsidepanelappearance.h" #include "llsidetray.h" #include "lltrans.h" #include "llviewerassettype.h" @@ -4884,15 +4885,9 @@ void LLWearableBridge::editOnAvatar() const LLWearable* wearable = gAgentWearables.getWearableFromItemID(linked_id); if( wearable ) { - // Set the tab to the right wearable. - if (gFloaterCustomize) - gFloaterCustomize->setCurrentWearableType( wearable->getType() ); + LLPanel * panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance"); - if( CAMERA_MODE_CUSTOMIZE_AVATAR != gAgentCamera.getCameraMode() ) - { - // Start Avatar Customization - gAgentCamera.changeCameraToCustomizeAvatar(); - } + LLSidePanelAppearance::editWearable(wearable, panel); } } diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 359b523dd6..2ba39fca9c 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -956,6 +956,10 @@ void LLPanelEditWearable::changeCamera(U8 subpart) } } +void LLPanelEditWearable::updateScrollingPanelList() +{ + updateScrollingPanelUI(); +} void LLPanelEditWearable::initializePanel() { diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 5de2bcb170..0af3758a4e 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -66,6 +66,8 @@ public: void showDefaultSubpart(); void onTabExpandedCollapsed(const LLSD& param, U8 index); + void updateScrollingPanelList(); + static void onRevertButtonClicked(void* userdata); void onCommitSexChange(); diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 010d593b27..6f934a0b66 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -465,3 +465,19 @@ void LLSidepanelAppearance::setWearablesLoading(bool val) childSetVisible("wearables_loading_indicator", val); childSetVisible("edit_outfit_btn", !val); } + +void LLSidepanelAppearance::showDefaultSubpart() +{ + if (mEditWearable->getVisible()) + { + mEditWearable->showDefaultSubpart(); + } +} + +void LLSidepanelAppearance::updateScrollingPanelList() +{ + if (mEditWearable->getVisible()) + { + mEditWearable->updateScrollingPanelList(); + } +} diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 12303b6e96..5bde962c8d 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -67,6 +67,8 @@ public: void showOutfitEditPanel(); void showWearableEditPanel(LLWearable *wearable = NULL); void setWearablesLoading(bool val); + void showDefaultSubpart(); + void updateScrollingPanelList(); private: void onFilterEdit(const std::string& search_string); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index f0532d5a31..838f57073e 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -883,9 +883,10 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item) if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) { // If we're in appearance editing mode, the current tab may need to be refreshed - if (gFloaterCustomize) + LLSidepanelAppearance *panel = dynamic_cast<LLSidePanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if (panel) { - gFloaterCustomize->switchToDefaultSubpart(); + panel->showDefaultSubpart(); } } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e0463e3c4a..f72f122f8a 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4545,7 +4545,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) gResizeScreenTexture = TRUE; - if (gFloaterCustomize && gFloaterCustomize->getVisible()) + if (gAgentCamera.cameraCustomizeAvatar()) { LLVisualParamHint::requestHintUpdates(); } diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 10b9a18fa8..358defbb31 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -705,9 +705,9 @@ void LLWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload_bake } } - if( gFloaterCustomize ) + if( gAgentCamera.cameraCustomizeAvatar() ) { - gFloaterCustomize->setWearable(type, NULL, PERM_ALL, TRUE); + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); } gAgentAvatarp->updateVisualParams(); @@ -976,9 +976,11 @@ void LLWearable::revertValues() syncImages(mSavedTEMap, mTEMap); - if( gFloaterCustomize ) + + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if( panel ) { - gFloaterCustomize->updateScrollingPanelList(TRUE); + panel->updateScrollingPanelList(); } } @@ -1015,9 +1017,11 @@ void LLWearable::saveValues() // Deep copy of mTEMap (copies only those tes that are current, filling in defaults where needed) syncImages(mTEMap, mSavedTEMap); - if( gFloaterCustomize ) + + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if( panel ) { - gFloaterCustomize->updateScrollingPanelList(TRUE); + panel->updateScrollingPanelList(); } } |