Added money display to inventory GUI. Corrected inventory amounts displaying incorrectly in inventory menus (references to other items fixed). Added MenuIconButton appearance flags to disable outlines/backgrounds
This commit is contained in:
@@ -67,7 +67,7 @@ public:
|
||||
vf2d buttonSize=options.size;
|
||||
vf2d totalSpacing={options.padding+buttonSize.x,options.padding+buttonSize.y};
|
||||
|
||||
auto newItem=ADD("item_"+cat+"_"+std::to_string(itemIndex),RowItemDisplay)({totalSpacing*vf2d{float(x),float(y)},buttonSize},Inventory::get(cat)[itemIndex],inventoryButtonClickAction,itemNameLabelName,itemDescriptionLabelName,inventoryButtonsActive?ButtonAttr::NONE:ButtonAttr::UNSELECTABLE)END;
|
||||
auto newItem=ADD("item_"+cat+"_"+std::to_string(itemIndex),RowItemDisplay)({totalSpacing*vf2d{float(x),float(y)},buttonSize},Inventory::GetInventorySlot(cat,itemIndex),inventoryButtonClickAction,itemNameLabelName,itemDescriptionLabelName,inventoryButtonsActive?ButtonAttr::NONE:ButtonAttr::UNSELECTABLE)END;
|
||||
newItem->SetCompactDescriptions(compact==COMPACT);
|
||||
newItem->SetHoverFunc(inventoryButtonHoverAction);
|
||||
newItem->SetMouseOutFunc(inventoryButtonMouseOutAction);
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
for(int counter=0;MenuComponent*component:components){
|
||||
RowItemDisplay*item=dynamic_cast<RowItemDisplay*>(component);
|
||||
if(item!=nullptr){
|
||||
item->SetItem(Inventory::get(cat)[counter]);
|
||||
item->SetItem(Inventory::GetInventorySlot(cat,counter));
|
||||
}else{
|
||||
ERR("WARNING! Could not properly cast item to RowItemDisplay* type!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user