Equip Window is now functional.
This commit is contained in:
@@ -68,6 +68,7 @@ class Menu:public IAttributable{
|
||||
friend class Crawler;
|
||||
friend struct Player;
|
||||
friend class ItemInfo;
|
||||
friend class PlayerStats;
|
||||
|
||||
float buttonHoldTime=0;
|
||||
vi2d selection={-1,-1};
|
||||
@@ -76,6 +77,7 @@ class Menu:public IAttributable{
|
||||
MenuComponent*draggingComponent=nullptr;
|
||||
Renderable r,overlay;
|
||||
static safemap<ITCategory,std::vector<MenuComponent*>>inventoryListeners; //All menu components that care about inventory updates subscribe to this list indirectly (See Menu::AddInventoryListener()).
|
||||
static std::vector<MenuComponent*>equipStatListeners; //All menu components that care about stat/equip updates subscribe to this list indirectly (See Menu::AddStatListener()).
|
||||
public:
|
||||
//The constructor is private. Use CreateMenu() instead!
|
||||
Menu()=default;
|
||||
@@ -107,6 +109,7 @@ public:
|
||||
void SetMouseNavigation(bool mouseNavigation);
|
||||
static void InventorySlotsUpdated(ITCategory cat); //Called whenever an inventory item gets added to the player's inventory, thus increasing the total number of slots in our bag.
|
||||
static void AddInventoryListener(MenuComponent*component,ITCategory category); //Adds a component to be in a given listener category.
|
||||
static void AddEquipStatListener(MenuComponent*component); //Adds a component to be in an equip stat listener. Will receive updates whenever stats are updated via equips.
|
||||
vf2d center();
|
||||
//Returns the last menu type created and last registered component, in case a component is detected as memory leaking, provides this information to each component for safety.
|
||||
static std::pair<MenuType,std::string>GetMemoryLeakReportInfo();
|
||||
|
||||
Reference in New Issue
Block a user