aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventoryview.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-06-07 23:20:15 -0700
committerJacek Antonelli2010-06-19 02:43:33 -0500
commitcee7da2602f22d8450eb46f92564f58a80267909 (patch)
treec7b18a2a30ae54dfdede6f8ec08a95c1e12a1b31 /linden/indra/newview/llinventoryview.cpp
parentAdded a little easter egg for Jacek (diff)
downloadmeta-impy-cee7da2602f22d8450eb46f92564f58a80267909.zip
meta-impy-cee7da2602f22d8450eb46f92564f58a80267909.tar.gz
meta-impy-cee7da2602f22d8450eb46f92564f58a80267909.tar.bz2
meta-impy-cee7da2602f22d8450eb46f92564f58a80267909.tar.xz
Fixed group notice history showing wrong icons for attached inventory
Diffstat (limited to 'linden/indra/newview/llinventoryview.cpp')
-rw-r--r--linden/indra/newview/llinventoryview.cpp131
1 files changed, 131 insertions, 0 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp
index 7be1542..e6041c4 100644
--- a/linden/indra/newview/llinventoryview.cpp
+++ b/linden/indra/newview/llinventoryview.cpp
@@ -1585,6 +1585,137 @@ std::string get_item_icon_name(LLInventoryType::NType inv_ntype,
1585 return ICON_NAME[idx]; 1585 return ICON_NAME[idx];
1586} 1586}
1587 1587
1588std::string get_item_icon_name(LLAssetType::EType asset_type,
1589 LLInventoryType::NType inv_ntype,
1590 U32 flags,
1591 BOOL item_is_multi)
1592{
1593 EInventoryIcon idx = OBJECT_ICON_NAME;
1594 if ( item_is_multi )
1595 {
1596 idx = OBJECT_MULTI_ICON_NAME;
1597 }
1598
1599 switch(asset_type)
1600 {
1601 case LLAssetType::AT_TEXTURE:
1602 if(LLInventoryType::NIT_SNAPSHOT == inv_ntype)
1603 {
1604 idx = SNAPSHOT_ICON_NAME;
1605 }
1606 else
1607 {
1608 idx = TEXTURE_ICON_NAME;
1609 }
1610 break;
1611
1612 case LLAssetType::AT_SOUND:
1613 idx = SOUND_ICON_NAME;
1614 break;
1615 case LLAssetType::AT_CALLINGCARD:
1616 if(flags != 0)
1617 {
1618 idx = CALLINGCARD_ONLINE_ICON_NAME;
1619 }
1620 else
1621 {
1622 idx = CALLINGCARD_OFFLINE_ICON_NAME;
1623 }
1624 break;
1625 case LLAssetType::AT_LANDMARK:
1626 if(flags!= 0)
1627 {
1628 idx = LANDMARK_VISITED_ICON_NAME;
1629 }
1630 else
1631 {
1632 idx = LANDMARK_ICON_NAME;
1633 }
1634 break;
1635 case LLAssetType::AT_SCRIPT:
1636 case LLAssetType::AT_LSL_TEXT:
1637 case LLAssetType::AT_LSL_BYTECODE:
1638 idx = SCRIPT_ICON_NAME;
1639 break;
1640 case LLAssetType::AT_CLOTHING:
1641 idx = CLOTHING_ICON_NAME;
1642 switch(LLInventoryItem::II_FLAGS_WEARABLES_MASK & flags)
1643 {
1644 case WT_SHIRT:
1645 idx = CLOTHING_SHIRT_ICON_NAME;
1646 break;
1647 case WT_PANTS:
1648 idx = CLOTHING_PANTS_ICON_NAME;
1649 break;
1650 case WT_SHOES:
1651 idx = CLOTHING_SHOES_ICON_NAME;
1652 break;
1653 case WT_SOCKS:
1654 idx = CLOTHING_SOCKS_ICON_NAME;
1655 break;
1656 case WT_JACKET:
1657 idx = CLOTHING_JACKET_ICON_NAME;
1658 break;
1659 case WT_GLOVES:
1660 idx = CLOTHING_GLOVES_ICON_NAME;
1661 break;
1662 case WT_UNDERSHIRT:
1663 idx = CLOTHING_UNDERSHIRT_ICON_NAME;
1664 break;
1665 case WT_UNDERPANTS:
1666 idx = CLOTHING_UNDERPANTS_ICON_NAME;
1667 break;
1668 case WT_SKIRT:
1669 idx = CLOTHING_SKIRT_ICON_NAME;
1670 break;
1671 case WT_ALPHA:
1672 idx = CLOTHING_ALPHA_ICON_NAME;
1673 break;
1674 case WT_TATTOO:
1675 idx = CLOTHING_TATTOO_ICON_NAME;
1676 break;
1677 default:
1678 // no-op, go with choice above
1679 break;
1680 }
1681 break;
1682 case LLAssetType::AT_BODYPART:
1683 idx = BODYPART_ICON_NAME;
1684 switch(LLInventoryItem::II_FLAGS_WEARABLES_MASK & flags)
1685 {
1686 case WT_SHAPE:
1687 idx = BODYPART_SHAPE_ICON_NAME;
1688 break;
1689 case WT_SKIN:
1690 idx = BODYPART_SKIN_ICON_NAME;
1691 break;
1692 case WT_HAIR:
1693 idx = BODYPART_HAIR_ICON_NAME;
1694 break;
1695 case WT_EYES:
1696 idx = BODYPART_EYES_ICON_NAME;
1697 break;
1698 default:
1699 // no-op, go with choice above
1700 break;
1701 }
1702 break;
1703 case LLAssetType::AT_NOTECARD:
1704 idx = NOTECARD_ICON_NAME;
1705 break;
1706 case LLAssetType::AT_ANIMATION:
1707 idx = ANIMATION_ICON_NAME;
1708 break;
1709 case LLAssetType::AT_GESTURE:
1710 idx = GESTURE_ICON_NAME;
1711 break;
1712 default:
1713 break;
1714 }
1715
1716 return ICON_NAME[idx];
1717}
1718
1588LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, 1719LLUIImagePtr get_item_icon(LLAssetType::EType asset_type,
1589 LLInventoryType::EType inventory_type, 1720 LLInventoryType::EType inventory_type,
1590 U32 attachment_point, 1721 U32 attachment_point,