Update labels for different zones when clicking through them.

This commit is contained in:
2023-11-12 23:51:49 -06:00
parent 4c6be02543
commit 2594078794
6 changed files with 19 additions and 2 deletions
@@ -14,6 +14,13 @@ public:
inline EncountersSpawnListScrollableWindowComponent(MenuType parent,geom2d::rect<float>rect,ComponentAttr attributes=ComponentAttr::BACKGROUND|ComponentAttr::OUTLINE)
:ScrollableWindowComponent(parent,rect,attributes){}
virtual inline void UpdateSpawns(std::vector<int>&spawns){
Menu::menus.at(parentMenu)->components.erase_if([&](auto key){
if(key.first.starts_with("Spawn ")){
std::erase_if(components,[&](MenuComponent*component){return key.second==component;});
delete key.second;
return true;
}
return false;});
int offsetY=0;
vf2d parentPos=Menu::menus.at(OVERWORLD_LEVEL_SELECT)->pos;
vf2d parentSize=Menu::menus.at(OVERWORLD_LEVEL_SELECT)->size;