summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.h
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-06-17 19:03:57 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-06-17 19:03:57 +0300
commit9f996443604a902e03de87d2d14545b4adffa69c (patch)
tree8ebeb38bfe7f09fdcb82173c5d2607242f0d62f5 /indra/newview/llinventoryfunctions.h
parent8d2ddff47e973c1692b42081e74dba3ad7745fdd (diff)
EXT-7722 Fixed "Add to COF" and "Remove from COF" outfit context menu items to be enabled when appropriate and work properly.
Work on "Take Off - Remove from Current Outfit" and "Wear - Add to Current Outfit" menu options: - The menu items of the outfit context menu and the My Outfits gear menu are now disabled when inappropriate instead of being hidden. - The menu items get enabled/disabled depending on whether you can wear (take off) anything from the selected outfit. (was: depending on whether you're wearing the outfit) - Changed the way the options work: they now only operate on clothes and attachments. "Add to COF" now only adds those body parts that are missing in COF; "Remove from COF" doesn't touch body parts at all. Without this change both "Add" and "Remove" options would be available simultaneously, because any valid outfit contains body parts. I think that would be confusing. And you don't expect you body parts to be replaced when doing "Add to COF'. (that's addition, not replacement) Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/585/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llinventoryfunctions.h')
-rw-r--r--indra/newview/llinventoryfunctions.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 93c56e1b8a..1795b54679 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -337,6 +337,21 @@ public:
LLInventoryItem* item);
};
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLFindWearablesEx
+//
+// Collects wearables based on given criteria.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+class LLFindWearablesEx : public LLInventoryCollectFunctor
+{
+public:
+ LLFindWearablesEx(bool is_worn, bool include_body_parts = true);
+ virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item);
+private:
+ bool mIncludeBodyParts;
+ bool mIsWorn;
+};
+
//Inventory collect functor collecting wearables of a specific wearable type
class LLFindWearablesOfType : public LLInventoryCollectFunctor
{
@@ -363,15 +378,6 @@ public:
}
};
-// Find worn items.
-class LLFindWorn : public LLInventoryCollectFunctor
-{
-public:
- LLFindWorn() {}
- virtual ~LLFindWorn() {}
- virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item);
-};
-
// Collect non-removable folders and items.
class LLFindNonRemovableObjects : public LLInventoryCollectFunctor
{