Render the spawn list and stage name/chapter name in level select.

This commit is contained in:
2023-11-12 22:23:54 -06:00
parent bc07f58c9a
commit 88e01b8503
13 changed files with 69 additions and 14 deletions
+6 -1
View File
@@ -6,6 +6,8 @@
#include "Unlock.h"
#include "ConnectionPoint.h"
#include "utils.h"
#include "MenuLabel.h"
#include "EncountersSpawnListScrollableWindowComponent.h"
INCLUDE_MONSTER_LIST
INCLUDE_game
@@ -24,7 +26,10 @@ void State_OverworldMap::OnStateChange(GameState*prevState){
game->GetPlayer()->UpdateWalkingAnimation(DOWN);
game->GetPlayer()->SetState(State::FORCE_WALK);
game->GetPlayer()->SetSizeMult(1);
game->camera.MoveCamera(game->GetPlayer()->GetPos());
game->camera.MoveCamera(currentConnectionPoint->rect.middle()+vf2d{game->GetScreenSize().x/6.0f,0});
COMPONENT(MenuLabel,OVERWORLD_LEVEL_SELECT,"Chapter Label")->SetLabel("Chapter "+std::to_string(game->GetCurrentChapter()));
COMPONENT(MenuLabel,OVERWORLD_LEVEL_SELECT,"Stage Label")->SetLabel(currentConnectionPoint->name);
COMPONENT(EncountersSpawnListScrollableWindowComponent,OVERWORLD_LEVEL_SELECT,"Spawns List")->UpdateSpawns(currentConnectionPoint->spawns);
Menu::OpenMenu(OVERWORLD_LEVEL_SELECT,false);
};
void State_OverworldMap::OnUserUpdate(Crawler*game){