An inventory scrollable component window should not be the same as an inventory window as they would layout things differently. Separated into proper hierarchy.

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
2023-10-18 18:07:10 +00:00
parent 1f40e846ac
commit e9952ca1be
6 changed files with 95 additions and 77 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
#include "Item.h"
#include "MenuItemButton.h"
#include "MenuLabel.h"
#include "ScrollableWindowComponent.h"
#include "InventoryScrollableWindowComponent.h"
typedef Attribute A;
@@ -21,7 +21,7 @@ void Menu::InitializeInventoryWindow(){
Menu*inventoryWindow=CreateMenu(INVENTORY,CENTERED,windowSize);
ScrollableWindowComponent*inventory=new ScrollableWindowComponent(INVENTORY,{{1,0},{windowSize.x,float(totalSpacing*3-itemSpacing)}},nullptr,[](MenuFuncData data){});
InventoryScrollableWindowComponent*inventory=new InventoryScrollableWindowComponent(INVENTORY,{{1,0},{windowSize.x,float(totalSpacing*3-itemSpacing)}},nullptr,[](MenuFuncData data){});
inventoryWindow->AddComponent("inventory",inventory);
Menu::AddInventoryListener(inventory,"Consumables");
Menu::AddInventoryListener(inventory,"Equipment");