aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-10 18:07:12 -0600
committerJacek Antonelli2008-12-10 18:07:12 -0600
commitc50e636241ba150b41907f48c6dc4f50e8aec997 (patch)
tree125e4d2e3d755375cbed42b135c7a7f7f8b5ee8c /linden
parentUse NType to find inventory icon name (part 1 of 2). (diff)
downloadmeta-impy-c50e636241ba150b41907f48c6dc4f50e8aec997.zip
meta-impy-c50e636241ba150b41907f48c6dc4f50e8aec997.tar.gz
meta-impy-c50e636241ba150b41907f48c6dc4f50e8aec997.tar.bz2
meta-impy-c50e636241ba150b41907f48c6dc4f50e8aec997.tar.xz
Use NType to find inventory icon name (part 2 of 2).
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/llinventoryview.cpp142
1 files changed, 142 insertions, 0 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp
index e218202..52c3b7e 100644
--- a/linden/indra/newview/llinventoryview.cpp
+++ b/linden/indra/newview/llinventoryview.cpp
@@ -1343,6 +1343,148 @@ std::string get_item_icon_name(LLInventoryType::NType inv_ntype,
1343{ 1343{
1344 EInventoryIcon idx = OBJECT_ICON_NAME; 1344 EInventoryIcon idx = OBJECT_ICON_NAME;
1345 1345
1346 switch( inv_ntype )
1347 {
1348 // BODY PARTS
1349
1350 case LLInventoryType::NIT_SHAPE:
1351 idx = BODYPART_SHAPE_ICON_NAME;
1352 break;
1353 case LLInventoryType::NIT_SKIN:
1354 idx = BODYPART_SKIN_ICON_NAME;
1355 break;
1356 case LLInventoryType::NIT_HAIR:
1357 idx = BODYPART_HAIR_ICON_NAME;
1358 break;
1359 case LLInventoryType::NIT_EYES:
1360 idx = BODYPART_EYES_ICON_NAME;
1361 break;
1362
1363 case LLInventoryType::NIT_BODYPART:
1364 idx = BODYPART_ICON_NAME;
1365 break;
1366
1367
1368 // CLOTHING
1369
1370 case LLInventoryType::NIT_SHIRT:
1371 idx = CLOTHING_SHIRT_ICON_NAME;
1372 break;
1373 case LLInventoryType::NIT_PANTS:
1374 idx = CLOTHING_PANTS_ICON_NAME;
1375 break;
1376 case LLInventoryType::NIT_SHOES:
1377 idx = CLOTHING_SHOES_ICON_NAME;
1378 break;
1379 case LLInventoryType::NIT_SOCKS:
1380 idx = CLOTHING_SOCKS_ICON_NAME;
1381 break;
1382 case LLInventoryType::NIT_JACKET:
1383 idx = CLOTHING_JACKET_ICON_NAME;
1384 break;
1385 case LLInventoryType::NIT_GLOVES:
1386 idx = CLOTHING_GLOVES_ICON_NAME;
1387 break;
1388 case LLInventoryType::NIT_UNDERSHIRT:
1389 idx = CLOTHING_UNDERSHIRT_ICON_NAME;
1390 break;
1391 case LLInventoryType::NIT_UNDERPANTS:
1392 idx = CLOTHING_UNDERPANTS_ICON_NAME;
1393 break;
1394 case LLInventoryType::NIT_SKIRT:
1395 idx = CLOTHING_SKIRT_ICON_NAME;
1396 break;
1397
1398 case LLInventoryType::NIT_CLOTHING:
1399 idx = CLOTHING_ICON_NAME;
1400 break;
1401
1402
1403 // TEXTURES / SNAPSHOTS
1404
1405 case LLInventoryType::NIT_SNAPSHOT:
1406 idx = SNAPSHOT_ICON_NAME;
1407 break;
1408 case LLInventoryType::NIT_TEXTURE:
1409 case LLInventoryType::NIT_IMAGE:
1410 idx = TEXTURE_ICON_NAME;
1411 break;
1412
1413
1414 // CALLING CARDS
1415
1416 case LLInventoryType::NIT_CALLCARD_ON:
1417 idx = CALLINGCARD_ONLINE_ICON_NAME;
1418 break;
1419 case LLInventoryType::NIT_CALLCARD_OFF:
1420 case LLInventoryType::NIT_CALLCARD:
1421 idx = CALLINGCARD_OFFLINE_ICON_NAME;
1422 break;
1423
1424
1425 // LANDMARKS
1426
1427 case LLInventoryType::NIT_LANDMARK_USED:
1428 idx = LANDMARK_VISITED_ICON_NAME;
1429 break;
1430 case LLInventoryType::NIT_LANDMARK_UNUSED:
1431 case LLInventoryType::NIT_LANDMARK:
1432 idx = LANDMARK_ICON_NAME;
1433 break;
1434
1435
1436 // SOUNDS
1437
1438 case LLInventoryType::NIT_SOUND:
1439 idx = SOUND_ICON_NAME;
1440 break;
1441
1442
1443 // ANIMATIONS
1444
1445 case LLInventoryType::NIT_ANIMATION:
1446 idx = ANIMATION_ICON_NAME;
1447 break;
1448
1449
1450 // GESTURES
1451
1452 case LLInventoryType::NIT_GESTURE:
1453 idx = GESTURE_ICON_NAME;
1454 break;
1455
1456
1457 // NOTECARD
1458
1459 case LLInventoryType::NIT_NOTECARD:
1460 idx = NOTECARD_ICON_NAME;
1461 break;
1462
1463
1464 // SCRIPTS
1465
1466 case LLInventoryType::NIT_SCRIPT_LSL2:
1467 idx = SCRIPT_ICON_NAME;
1468 break;
1469
1470
1471 // OBJECTS
1472
1473 case LLInventoryType::NIT_OBJECT:
1474 if( item_is_multi )
1475 {
1476 idx = OBJECT_MULTI_ICON_NAME;
1477 }
1478 else
1479 {
1480 idx = OBJECT_ICON_NAME;
1481 }
1482 break;
1483
1484 default:
1485 break;
1486 }
1487
1346 return ICON_NAME[idx]; 1488 return ICON_NAME[idx];
1347} 1489}
1348 1490