diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2016-04-22 17:01:56 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2016-04-22 17:01:56 +0300 |
commit | 8d265cd59f0c141ae5fb5eadc0ef5e9007a38e29 (patch) | |
tree | 2f9efbaf5c2a00d18d3f85e7bacd76e2b9eb9268 /indra/newview/lloutfitgallery.h | |
parent | 8c98c8e1cb3a040bef7b2c93111034358099bca2 (diff) |
MAINT-6229 Organize Outfit Browser thumbnails
Diffstat (limited to 'indra/newview/lloutfitgallery.h')
-rw-r--r-- | indra/newview/lloutfitgallery.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index 1b6878bce3..285c8baf59 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -129,8 +129,9 @@ private: void moveRow(int row, int pos); LLPanel* addToRow(LLPanel* row_stack, LLOutfitGalleryItem* item, int pos, int hgap); void removeFromLastRow(LLOutfitGalleryItem* item); - void reArrangeRows(S32 row_diff); + void reArrangeRows(S32 row_diff = 0); void updateRowsIfNeeded(); + void updateGalleryWidth(); LLOutfitGalleryItem* buildGalleryItem(std::string name); @@ -211,6 +212,25 @@ public: void setOutfitName(std::string name); void setOutfitWorn(bool value); void setSelected(bool value); + + std::string getItemName() {return mOutfitName;} + bool mIsDefaultImage() {return mDefaultImage;} + + struct compareGalleryItem + { + bool operator()(LLOutfitGalleryItem* a, LLOutfitGalleryItem* b) + { + if((a->mIsDefaultImage() && b->mIsDefaultImage()) || (!a->mIsDefaultImage() && !b->mIsDefaultImage())) + { + return a->getItemName().compare(b->getItemName()) < 0; + } + else + { + return b->mIsDefaultImage(); + } + } + }; + private: LLPointer<LLViewerTexture> mTexturep; LLUUID mImageAssetId; @@ -220,6 +240,8 @@ private: LLPanel* mFotoBgPanel; bool mSelected; bool mWorn; + bool mDefaultImage; + std::string mOutfitName; }; #endif // LL_LLOUTFITGALLERYCTRL_H |