Added Merchant/Buy/Sell Menu windows. Added sorted item callbacks for traveling merchant inventory modifications.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user