Fixed detection of craftable items that aren't enhanceable (failed out of bounds checks). Hide information about craftable items that have yet to be unlocked.
consumableCraftingWindow->ADD("Item Name Label",MenuLabel)({{226,84},{inventoryDescriptionWidth-6,12}},"",0.75f,ComponentAttr::LEFT_ALIGN|ComponentAttr::SHADOW)END;
@ -118,6 +118,7 @@ class Menu:public IAttributable{
staticsafemap<ITCategory,std::vector<MenuComponent*>>inventoryListeners;//All menu components that care about inventory updates subscribe to this list indirectly (See Menu::AddInventoryListener()).
staticsafemap<ITCategory,std::vector<MenuComponent*>>merchantInventoryListeners;//All menu components that care about merchant inventory updates subscribe to this list indirectly (See Menu::AddMerchantInventoryListener()).
staticstd::vector<MenuComponent*>equipStatListeners;//All menu components that care about stat/equip updates subscribe to this list indirectly (See Menu::AddStatListener()).
staticstd::vector<MenuComponent*>chapterListeners;//All menu components that care about story chapter updates subscribe to this list indirectly (See Menu::AddChapterListener()).
public:
//The constructor is private. Use CreateMenu() instead!
Menu()=default;
@ -210,6 +211,7 @@ public:
staticvoidAddInventoryListener(MenuComponent*component,ITCategorycategory);//Adds a component to be in a given listener category.
staticvoidAddMerchantInventoryListener(MenuComponent*component,ITCategorycategory);//Adds a component to be in a given listener category.
staticvoidAddEquipStatListener(MenuComponent*component);//Adds a component to be in an equip stat listener. Will receive updates whenever stats are updated via equips.
staticvoidAddChapterListener(MenuComponent*component);//Adds a component to be in a chapter listener. Will receive updates anytime the chapter in-game changes.
vf2dcenter();
//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.