Added Merchant/Buy/Sell Menu windows. Added sorted item callbacks for traveling merchant inventory modifications.

This commit is contained in:
2023-12-19 17:10:04 -06:00
parent d9e1a1ebaf
commit 71fe49162d
23 changed files with 434 additions and 31 deletions
+2 -1
View File
@@ -81,7 +81,7 @@ void Menu::InitializeInventoryWindow(){
//Close the old inventory window and show the proper one.
Component<RowInventoryScrollableWindowComponent>(data.menu.GetType(),"Inventory Display - "+lastInventoryTypeOpened)->Enable(false);
Component<MenuComponent>(data.menu.GetType(),lastInventoryTypeOpened+" Inventory Tab")->SetSelected(false);
Component<InventoryScrollableWindowComponent>(data.menu.GetType(),"Inventory Display - "+data.component->S(A::CATEGORY_NAME))->Enable(true);
Component<RowInventoryScrollableWindowComponent>(data.menu.GetType(),"Inventory Display - "+data.component->S(A::CATEGORY_NAME))->Enable(true);
Component<MenuComponent>(data.menu.GetType(),data.component->S(A::CATEGORY_NAME)+" Inventory Tab")->SetSelected(true);
lastInventoryTypeOpened=data.component->S(A::CATEGORY_NAME);
return true;
@@ -106,6 +106,7 @@ void Menu::InitializeInventoryWindow(){
button->onClick(MenuFuncData{*inventoryWindow,game,button}); //Simulate a click of this button if it's the top one for an initial inventory display.
}
Menu::AddInventoryListener(inventoryDisplay,category);
inventoryDisplay->Enable(first);
inventoryDisplay->SetCompactDescriptions(false);