@ -73,7 +73,7 @@ std::function<void(InventoryScrollableWindowComponent&component,ITCategory cat)>
int totalSpacing = component . options . padding + buttonSize . x ;
component . ADD ( " item_ " + cat + " _ " + std : : to_string ( itemIndex ) , MenuItemButton ) ( { { float ( totalSpacing * x ) , float ( totalSpacing * y ) } , buttonSize } , Inventory : : get ( cat ) , itemIndex , component . inventoryButtonClickAction , component . inventoryButtonHoverAction , component . inventoryButtonMouseOutAction , component . parentMenu , component . itemNameLabelName , component . itemDescriptionLabelName , component . inventoryButtonsActive ? IconButtonAttr : : SELECTABLE : IconButtonAttr : : NOT_SELECTABLE ) END
- > SetCompactDescriptions ( component . compact = = COMPACT ) ;
- > SetCompactDescriptions ( component . compact ) ;
} ;
# pragma endregion
@ -92,7 +92,7 @@ std::function<void(InventoryScrollableWindowComponent&component,ITCategory cat)>
vf2d totalSpacing = { c - > options . padding + buttonSize . x , c - > options . padding + buttonSize . y } ;
auto newItem = c - > ADD ( " item_ " + cat + " _ " + std : : to_string ( itemIndex ) , RowItemDisplay ) ( { totalSpacing * vf2d { float ( x ) , float ( y ) } , buttonSize } , Inventory : : GetInventorySlot ( cat , itemIndex ) , c - > inventoryButtonClickAction , c - > itemNameLabelName , c - > itemDescriptionLabelName , c - > inventoryButtonsActive ? ButtonAttr : : NONE : ButtonAttr : : UNSELECTABLE ) END ;
newItem - > SetCompactDescriptions ( c - > compact = = COMPACT ) ;
newItem - > SetCompactDescriptions ( c - > compact ) ;
newItem - > SetPriceLabelType ( c - > priceLabel ) ;
newItem - > SetHoverFunc ( c - > inventoryButtonHoverAction ) ;
newItem - > SetMouseOutFunc ( c - > inventoryButtonMouseOutAction ) ;
@ -129,7 +129,7 @@ std::function<void(InventoryScrollableWindowComponent&component,ITCategory cat)>
vf2d totalSpacing = { c - > options . padding + buttonSize . x , c - > options . padding + buttonSize . y } ;
auto newItem = c - > ADD ( " merchant_item_ " + cat + " _ " + std : : to_string ( itemIndex ) , RowItemDisplay ) ( { totalSpacing * vf2d { float ( x ) , float ( y ) } , buttonSize } , Merchant : : GetCurrentTravelingMerchant ( ) . GetShopItems ( ) [ itemIndex ] , c - > inventoryButtonClickAction , c - > itemNameLabelName , c - > itemDescriptionLabelName , c - > inventoryButtonsActive ? ButtonAttr : : NONE : ButtonAttr : : UNSELECTABLE ) END ;
newItem - > SetCompactDescriptions ( c - > compact = = COMPACT ) ;
newItem - > SetCompactDescriptions ( c - > compact ) ;
newItem - > SetPriceLabelType ( c - > priceLabel ) ;
newItem - > SetHoverFunc ( c - > inventoryButtonHoverAction ) ;
newItem - > SetMouseOutFunc ( c - > inventoryButtonMouseOutAction ) ;
@ -161,10 +161,11 @@ std::function<void(InventoryScrollableWindowComponent&component,ITCategory cat)>
int y = int ( ( invSize - 1 ) / invWidth ) ;
int itemIndex = y * invWidth + x ;
auto newItem = c - > ADD ( " item_Weapon_ " + std : : to_string ( itemIndex ) , RowItemDisplay ) ( { totalSpacing * vf2d { float ( x ) , float ( y ) } , buttonSize } , weapon , c - > inventoryButtonClickAction , c - > itemNameLabelName , c - > itemDescriptionLabelName , c - > inventoryButtonsActive ? ButtonAttr : : NONE : ButtonAttr : : UNSELECTABLE ) END ;
newItem - > SetCompactDescriptions ( c - > compact = = COMPACT ) ;
newItem - > SetCompactDescriptions ( c - > compact ) ;
newItem - > SetPriceLabelType ( c - > priceLabel ) ;
newItem - > SetHoverFunc ( c - > inventoryButtonHoverAction ) ;
newItem - > SetMouseOutFunc ( c - > inventoryButtonMouseOutAction ) ;
newItem - > SetCheckCraftingRequirements ( true ) ;
}
} ;
# pragma endregion
@ -194,10 +195,11 @@ std::function<void(InventoryScrollableWindowComponent&component,ITCategory cat)>
int y = int ( ( invSize - 1 ) / invWidth ) ;
int itemIndex = y * invWidth + x ;
auto newItem = c - > ADD ( " item_Armor_ " + std : : to_string ( itemIndex ) , RowItemDisplay ) ( { totalSpacing * vf2d { float ( x ) , float ( y ) } , buttonSize } , armor , c - > inventoryButtonClickAction , c - > itemNameLabelName , c - > itemDescriptionLabelName , c - > inventoryButtonsActive ? ButtonAttr : : NONE : ButtonAttr : : UNSELECTABLE ) END ;
newItem - > SetCompactDescriptions ( c - > compact = = COMPACT ) ;
newItem - > SetCompactDescriptions ( c - > compact ) ;
newItem - > SetPriceLabelType ( c - > priceLabel ) ;
newItem - > SetHoverFunc ( c - > inventoryButtonHoverAction ) ;
newItem - > SetMouseOutFunc ( c - > inventoryButtonMouseOutAction ) ;
newItem - > SetCheckCraftingRequirements ( true ) ;
}
} ;
# pragma endregion