parent
bc07f58c9a
commit
88e01b8503
@ -0,0 +1,30 @@ |
|||||||
|
#pragma once |
||||||
|
#include "Menu.h" |
||||||
|
#include "MenuLabel.h" |
||||||
|
#include "Crawler.h" |
||||||
|
#include "ScrollableWindowComponent.h" |
||||||
|
#include "DEFINES.h" |
||||||
|
#include "Error.h" |
||||||
|
|
||||||
|
INCLUDE_MONSTER_DATA |
||||||
|
|
||||||
|
class EncountersSpawnListScrollableWindowComponent:public ScrollableWindowComponent{ |
||||||
|
protected: |
||||||
|
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){ |
||||||
|
int offsetY=0; |
||||||
|
vf2d parentPos=Menu::menus.at(OVERWORLD_LEVEL_SELECT)->pos; |
||||||
|
vf2d parentSize=Menu::menus.at(OVERWORLD_LEVEL_SELECT)->size; |
||||||
|
for(int spawn:spawns){ |
||||||
|
MenuLabel*spawnLabel=NEW MenuLabel(OVERWORLD_LEVEL_SELECT,{vf2d{0,float(offsetY)},{parentSize.x,12}},MONSTER_DATA.at(spawn-1).GetDisplayName()); |
||||||
|
AddComponent(Menu::menus.at(OVERWORLD_LEVEL_SELECT),"Spawn "+std::to_string(spawn),spawnLabel); |
||||||
|
offsetY+=14; |
||||||
|
} |
||||||
|
} |
||||||
|
protected: |
||||||
|
virtual inline void Cleanup()override{ |
||||||
|
|
||||||
|
} |
||||||
|
}; |
Loading…
Reference in new issue