Equip Window is now functional.

This commit is contained in:
2023-12-06 22:47:09 -06:00
parent 54677e9263
commit 88a239cd91
16 changed files with 272 additions and 53 deletions
+9 -1
View File
@@ -49,6 +49,7 @@ std::map<MenuType,Menu*>Menu::menus;
std::string Menu::themeSelection="BlueDefault";
safeunorderedmap<std::string,Theme>Menu::themes;
safemap<ITCategory,std::vector<MenuComponent*>>Menu::inventoryListeners;
std::vector<MenuComponent*>Menu::equipStatListeners;
const vf2d Menu::CENTERED = {-456,-456};
std::vector<MenuComponent*>Menu::unhandledComponents;
//////////////////////////////////////////////////////////////////////////////////////////////////
@@ -663,6 +664,13 @@ void Menu::AddInventoryListener(MenuComponent*component,ITCategory category){
}
}
void Menu::AddEquipStatListener(MenuComponent*component){
if(std::find(equipStatListeners.begin(),equipStatListeners.end(),component)!=equipStatListeners.end()){
ERR("WARNING! Component "<<component->name<<" has already been added to the Equip Stat listener list! There should not be any duplicates!!")
}
equipStatListeners.push_back(component);
}
vf2d Menu::center(){
return size/2;
}
@@ -716,4 +724,4 @@ void Menu::DrawThemedWindow(vf2d menuPos,vf2d size,Pixel renderColor){
DrawTiledWindowBackground(game,menuPos,size,renderColor);
DrawTiledWindowBorder(game,menuPos,size,renderColor);
}
}
}