commit
4a7c31ee1d
|
|
@ -306,6 +306,18 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op )
|
|||
}
|
||||
}
|
||||
|
||||
void LLColorSwatchCtrl::onFloaterClose()
|
||||
{
|
||||
LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get();
|
||||
|
||||
if (pickerp)
|
||||
{
|
||||
pickerp->setSwatch(NULL);
|
||||
}
|
||||
|
||||
mPickerHandle.markDead();
|
||||
}
|
||||
|
||||
void LLColorSwatchCtrl::setValid(BOOL valid )
|
||||
{
|
||||
mValid = valid;
|
||||
|
|
@ -323,7 +335,7 @@ void LLColorSwatchCtrl::showPicker(BOOL take_focus)
|
|||
if (!pickerp)
|
||||
{
|
||||
pickerp = new LLFloaterColorPicker(this, mCanApplyImmediately);
|
||||
gFloaterView->getParentFloater(this)->addDependentFloater(pickerp);
|
||||
//gFloaterView->getParentFloater(this)->addDependentFloater(pickerp);
|
||||
mPickerHandle = pickerp->getHandle();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ public:
|
|||
/*virtual*/ void setEnabled( BOOL enabled );
|
||||
|
||||
static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE );
|
||||
void onFloaterClose();
|
||||
|
||||
protected:
|
||||
BOOL mValid;
|
||||
|
|
|
|||
|
|
@ -241,6 +241,16 @@ BOOL LLFloaterColorPicker::postBuild()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLFloaterColorPicker::onClose(bool app_settings)
|
||||
{
|
||||
if (mSwatch)
|
||||
{
|
||||
mSwatch->onFloaterClose();
|
||||
}
|
||||
stopUsingPipette();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLFloaterColorPicker::initUI ( F32 rValIn, F32 gValIn, F32 bValIn )
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ class LLFloaterColorPicker
|
|||
|
||||
// overrides
|
||||
virtual BOOL postBuild ();
|
||||
virtual void onClose(bool app_settings);
|
||||
virtual void draw ();
|
||||
virtual BOOL handleMouseDown ( S32 x, S32 y, MASK mask );
|
||||
virtual BOOL handleMouseUp ( S32 x, S32 y, MASK mask );
|
||||
|
|
@ -69,6 +70,7 @@ class LLFloaterColorPicker
|
|||
void destroyUI ();
|
||||
void cancelSelection ();
|
||||
LLColorSwatchCtrl* getSwatch () { return mSwatch; };
|
||||
void setSwatch( LLColorSwatchCtrl* swatch) { mSwatch = swatch; }
|
||||
|
||||
// mutator / accessor for original RGB value
|
||||
void setOrigRgb ( F32 origRIn, F32 origGIn, F32 origBIn );
|
||||
|
|
|
|||
|
|
@ -2280,7 +2280,7 @@ bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& re
|
|||
iter != descendent_items.end();
|
||||
++iter)
|
||||
{
|
||||
const LLInventoryItem* item = (*iter);
|
||||
const LLViewerInventoryItem* item = (*iter);
|
||||
const LLUUID& item_id = item->getUUID();
|
||||
if (item->getType() == LLAssetType::AT_GESTURE
|
||||
&& LLGestureManager::instance().isGestureActive(item_id))
|
||||
|
|
|
|||
|
|
@ -1095,72 +1095,22 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co
|
|||
LLInventoryType::IT_GESTURE,
|
||||
PERM_ALL);
|
||||
}
|
||||
else if ("shirt" == type_name)
|
||||
else
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING);
|
||||
LLFolderBridge::createWearable(parent_id, WT_SHIRT);
|
||||
// Use for all clothing and body parts. Adding new wearable types requires updating LLWearableDictionary.
|
||||
EWearableType wearable_type = LLWearableDictionary::typeNameToType(type_name);
|
||||
if (wearable_type >= WT_SHAPE && wearable_type < WT_COUNT)
|
||||
{
|
||||
LLAssetType::EType asset_type = LLWearableDictionary::getAssetType(wearable_type);
|
||||
LLFolderType::EType folder_type = LLFolderType::assetTypeToFolderType(asset_type);
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(folder_type);
|
||||
LLFolderBridge::createWearable(parent_id, wearable_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Can't create unrecognized type " << type_name << llendl;
|
||||
}
|
||||
}
|
||||
else if ("pants" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING);
|
||||
LLFolderBridge::createWearable(parent_id, WT_PANTS);
|
||||
}
|
||||
else if ("shoes" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING);
|
||||
LLFolderBridge::createWearable(parent_id, WT_SHOES);
|
||||
}
|
||||
else if ("socks" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING);
|
||||
LLFolderBridge::createWearable(parent_id, WT_SOCKS);
|
||||
}
|
||||
else if ("jacket" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING);
|
||||
LLFolderBridge::createWearable(parent_id, WT_JACKET);
|
||||
}
|
||||
else if ("skirt" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING);
|
||||
LLFolderBridge::createWearable(parent_id, WT_SKIRT);
|
||||
}
|
||||
else if ("gloves" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING);
|
||||
LLFolderBridge::createWearable(parent_id, WT_GLOVES);
|
||||
}
|
||||
else if ("undershirt" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING);
|
||||
LLFolderBridge::createWearable(parent_id, WT_UNDERSHIRT);
|
||||
}
|
||||
else if ("underpants" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING);
|
||||
LLFolderBridge::createWearable(parent_id, WT_UNDERPANTS);
|
||||
}
|
||||
else if ("shape" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART);
|
||||
LLFolderBridge::createWearable(parent_id, WT_SHAPE);
|
||||
}
|
||||
else if ("skin" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART);
|
||||
LLFolderBridge::createWearable(parent_id, WT_SKIN);
|
||||
}
|
||||
else if ("hair" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART);
|
||||
LLFolderBridge::createWearable(parent_id, WT_HAIR);
|
||||
}
|
||||
else if ("eyes" == type_name)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART);
|
||||
LLFolderBridge::createWearable(parent_id, WT_EYES);
|
||||
}
|
||||
|
||||
folder->setNeedsAutoRename(TRUE);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue