diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-09-05 08:37:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-05 08:37:16 -0400 |
commit | 7ac4c3b56e5246fceaa73e7c9c665d3c04827d6c (patch) | |
tree | e96334bd9299102ebdaf229eec9cf4c2165f8c2f /indra/newview/llwearableitemslist.cpp | |
parent | 487973d3f0ee9b8583b3d977ca6a405cba5fe518 (diff) | |
parent | 6a747e1ce027700a3609f4c377179bfa29c3ce31 (diff) |
Merge pull request #2450 from secondlife/lua-merge
Merge updated 'main' branch into release/luau-scripting
Diffstat (limited to 'indra/newview/llwearableitemslist.cpp')
-rw-r--r-- | indra/newview/llwearableitemslist.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index e122cc0360..430e2a2d68 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -91,7 +91,7 @@ LLPanelWearableOutfitItem::Params::Params() { } -BOOL LLPanelWearableOutfitItem::postBuild() +bool LLPanelWearableOutfitItem::postBuild() { LLPanelWearableListItem::postBuild(); @@ -106,10 +106,10 @@ BOOL LLPanelWearableOutfitItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); } - return TRUE; + return true; } -BOOL LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask) +bool LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask) { if(!mShowWidgets) { @@ -124,7 +124,7 @@ BOOL LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask) { onAddWearable(); } - return TRUE; + return true; } void LLPanelWearableOutfitItem::onAddWearable() @@ -284,7 +284,7 @@ LLPanelClothingListItem::~LLPanelClothingListItem() { } -BOOL LLPanelClothingListItem::postBuild() +bool LLPanelClothingListItem::postBuild() { LLPanelDeletableWearableListItem::postBuild(); @@ -296,7 +296,7 @@ BOOL LLPanelClothingListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } ////////////////////////////////////////////////////////////////////////// @@ -361,7 +361,7 @@ LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem() { } -BOOL LLPanelBodyPartsListItem::postBuild() +bool LLPanelBodyPartsListItem::postBuild() { LLPanelInventoryListItemBase::postBuild(); @@ -371,7 +371,7 @@ BOOL LLPanelBodyPartsListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDeletableWearableListItem(&typeid(LLPanelDeletableWearableListItem::Params), "deletable_wearable_list_item"); @@ -404,7 +404,7 @@ LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInven setSeparatorVisible(true); } -BOOL LLPanelDeletableWearableListItem::postBuild() +bool LLPanelDeletableWearableListItem::postBuild() { LLPanelWearableListItem::postBuild(); @@ -417,7 +417,7 @@ BOOL LLPanelDeletableWearableListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } @@ -477,11 +477,11 @@ LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(LLWearableTyp return list_item; } -BOOL LLPanelDummyClothingListItem::postBuild() +bool LLPanelDummyClothingListItem::postBuild() { addWidgetToRightSide("btn_add_panel"); - setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE)); + setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, false)); updateItem(wearableTypeToString(mWearableType)); // Make it look loke clothing item - reserve space for 'delete' button @@ -490,7 +490,7 @@ BOOL LLPanelDummyClothingListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } LLWearableType::EType LLPanelDummyClothingListItem::getWearableType() const @@ -950,14 +950,14 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu return; } - const uuid_vec_t& ids = mUUIDs; // selected items IDs - U32 mask = 0; // mask of selected items' types - U32 n_items = ids.size(); // number of selected items - U32 n_worn = 0; // number of worn items among the selected ones - U32 n_already_worn = 0; // number of items worn of same type as selected items - U32 n_links = 0; // number of links among the selected items - U32 n_editable = 0; // number of editable items among the selected ones - U32 n_touchable = 0; // number of touchable items among the selected ones + const uuid_vec_t& ids = mUUIDs; // selected items IDs + U32 mask = 0; // mask of selected items' types + U32 n_items = static_cast<U32>(ids.size()); // number of selected items + U32 n_worn = 0; // number of worn items among the selected ones + U32 n_already_worn = 0; // number of items worn of same type as selected items + U32 n_links = 0; // number of links among the selected items + U32 n_editable = 0; // number of editable items among the selected ones + U32 n_touchable = 0; // number of touchable items among the selected ones bool can_be_worn = true; @@ -1032,8 +1032,8 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu setMenuItemEnabled(menu, "take_off_or_detach", n_worn == n_items); setMenuItemVisible(menu, "object_profile", !standalone); setMenuItemEnabled(menu, "object_profile", n_items == 1); - setMenuItemVisible(menu, "--no options--", FALSE); - setMenuItemEnabled(menu, "--no options--", FALSE); + setMenuItemVisible(menu, "--no options--", false); + setMenuItemEnabled(menu, "--no options--", false); // Populate or hide the "Attach to..." / "Attach to HUD..." submenus. if (mask == MASK_ATTACHMENT && n_worn == 0) @@ -1062,7 +1062,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu } if (num_visible_items == 0) { - setMenuItemVisible(menu, "--no options--", TRUE); + setMenuItemVisible(menu, "--no options--", true); } } @@ -1082,8 +1082,8 @@ void LLWearableItemsList::ContextMenu::updateItemsLabels(LLContextMenu* menu) menu_item->setLabel(new_label); } -// We need this method to convert non-zero BOOL values to exactly 1 (TRUE). -// Otherwise code relying on a BOOL value being TRUE may fail +// We need this method to convert non-zero bool values to exactly 1 (true). +// Otherwise code relying on a bool value being true may fail // (I experienced a weird assert in LLView::drawChildren() because of that. // static void LLWearableItemsList::ContextMenu::setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val) |