Added Merchant/Buy/Sell Menu windows. Added sorted item callbacks for traveling merchant inventory modifications.
This commit is contained in:
@@ -55,7 +55,7 @@ void Menu::InitializeConsumableInventoryWindow(){
|
||||
|
||||
inventoryWindow->I(A::LOADOUT_SLOT)=0;
|
||||
|
||||
inventoryWindow->ADD("inventory",InventoryScrollableWindowComponent)({{1,20},{windowSize.x,96.f}},"Consumables","itemName","itemDescription",
|
||||
auto consumableWindow=inventoryWindow->ADD("inventory",InventoryScrollableWindowComponent)({{1,20},{windowSize.x,96.f}},"Consumables","itemName","itemDescription",
|
||||
[&](MenuFuncData data){
|
||||
MenuItemButton*button=(MenuItemButton*)data.component;
|
||||
data.game->ClearLoadoutItem(data.menu.I(A::LOADOUT_SLOT));
|
||||
@@ -78,6 +78,7 @@ void Menu::InitializeConsumableInventoryWindow(){
|
||||
data.game->SetLoadoutItem(button->selected,button->GetItem().ActualName());
|
||||
return true;
|
||||
})END;
|
||||
Menu::AddInventoryListener(consumableWindow,"Consumables");
|
||||
|
||||
//We don't have to actually populate the inventory list because now when an item gets added, it will automatically add the correct component in for us.
|
||||
inventoryWindow->ADD("Inventory Type Label",MenuLabel)({{0,0},{windowSize.x-1,18}},"Consumables",2,ComponentAttr::SHADOW|ComponentAttr::BACKGROUND|ComponentAttr::OUTLINE)END;
|
||||
|
||||
Reference in New Issue
Block a user