Fix ViewPort PGEX. Added Draw String functions from PGE to ViewPort.

This commit is contained in:
2023-12-14 01:43:42 -06:00
parent c11417d8a0
commit 4bab1397dc
15 changed files with 823 additions and 17 deletions
+13 -12
View File
@@ -50,6 +50,7 @@ void State_GameRun::OnStateChange(GameState*prevState){
Menu::CloseAllMenus();
}
game->GetPlayer()->SetState(State::NORMAL);
port=ViewPort::rectViewPort({0,0},{72,100},{75,100});
}
void State_GameRun::OnUserUpdate(Crawler*game){
game->bossDisplayTimer=std::max(0.f,game->bossDisplayTimer-game->GetElapsedTime());
@@ -79,16 +80,16 @@ void State_GameRun::Draw(Crawler*game){
}
void State_GameRun::FontTest(){
game->DrawStringDecal({8,8},"#000000This is a #000066test of hex");
game->DrawStringDecal({8,16},"#FF0000This is a #BFA6F9test of hex");
game->DrawStringDecal({8,24},"#00FF00This is a #E9A6F9test of hex");
game->DrawStringDecal({8,32},"#0000FFThis is a #F9E8A6test of hex");
game->DrawShadowStringDecal({8,40},"#000000This is a #000066test of hex");
game->DrawShadowStringDecal({8,48},"#FF0000This is a #BFA6F9test of hex");
game->DrawShadowStringDecal({8,56},"#00FF00This is a #E9A6F9test of hex");
game->DrawShadowStringDecal({8,64},"#0000FFThis is a #F9E8A6test of hex");
game->DrawShadowStringDecal(VisualNovel::font,{8,72},U"#000000This is a #000066test of hex");
game->DrawShadowStringDecal(VisualNovel::font,{8,80},U"#FF0000This is a #BFA6F9test of hex");
game->DrawShadowStringDecal(VisualNovel::font,{8,88},U"#00FF00This is a #E9A6F9test of hex");
game->DrawShadowStringDecal(VisualNovel::font,{8,96},U"#0000FFThis is a #F9E8A6test of hex");
port.DrawStringDecal({8,8},"#FFFFFFThis is a #000066test of hex");
port.DrawStringDecal({8,16},"#FF0000This is a #BFA6F9test of hex");
port.DrawStringDecal({8,24},"#00FF00This is a #E9A6F9test of hex");
port.DrawStringDecal({8,32},"#0000FFThis is a #F9E8A6test of hex");
port.DrawShadowStringDecal({8,40},"#FFFFFFThis is a #000066test of hex");
port.DrawShadowStringDecal({8,48},"#FF0000This is a #BFA6F9test of hex");
port.DrawShadowStringDecal({8,56},"#00FF00This is a #E9A6F9test of hex");
port.DrawShadowStringDecal({8,64},"#0000FFThis is a #F9E8A6test of hex");
port.DrawShadowStringDecal(VisualNovel::font,{8,72},U"#FFFFFFThis is a #000066test of hex");
port.DrawShadowStringDecal(VisualNovel::font,{8,80},U"#FF0000This is a #BFA6F9test of hex");
port.DrawShadowStringDecal(VisualNovel::font,{8,88},U"#00FF00This is a #E9A6F9test of hex");
port.DrawShadowStringDecal(VisualNovel::font,{8,96},U"#0000FFThis is a #F9E8A6test of hex");
}