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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user