Implemented hex color font coloring.

This commit is contained in:
2023-12-08 15:50:40 -06:00
parent 88a239cd91
commit df1d9771aa
5 changed files with 193 additions and 87 deletions
+19 -3
View File
@@ -50,7 +50,7 @@ void State_GameRun::OnStateChange(GameState*prevState){
Menu::CloseAllMenus();
}
game->GetPlayer()->SetState(State::NORMAL);
};
}
void State_GameRun::OnUserUpdate(Crawler*game){
game->bossDisplayTimer=std::max(0.f,game->bossDisplayTimer-game->GetElapsedTime());
if(game->encounterStarted&&game->totalBossEncounterMobs>0){
@@ -72,7 +72,23 @@ void State_GameRun::OnUserUpdate(Crawler*game){
ItemDrop::UpdateDrops(game->GetElapsedTime());
game->UpdateBullets(game->GetElapsedTime());
game->UpdateCamera(game->GetElapsedTime());
};
}
void State_GameRun::Draw(Crawler*game){
game->RenderHud();
};
//FontTest(); //Enable to test font coloring.
}
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");
}