Añadidas nuevas funciones a la calse screen para mostrar el borde

This commit is contained in:
2022-09-12 11:46:41 +02:00
parent f9eb36f529
commit 561f957bca
5 changed files with 59 additions and 11 deletions

View File

@@ -113,11 +113,12 @@ void ScoreBoard::render()
// Escribe los textos
const std::string timeTxt = std::to_string((clock.minutes % 60) / 10) + std::to_string(clock.minutes % 10) + clock.separator + std::to_string((clock.seconds % 60) / 10) + std::to_string(clock.seconds % 10);
const std::string itemsTxt = std::to_string(board->items / 100) + std::to_string((board->items % 100) / 10) + std::to_string(board->items % 10);
const std::string roomsTxt = std::to_string(board->rooms / 100) + std::to_string((board->rooms % 100) / 10) + std::to_string(board->rooms % 10);
this->text->writeColored(BLOCK, line1, "Items collected ", stringToColor("yellow"));
this->text->writeColored(17 * BLOCK, line1, itemsTxt, stringToColor("bright_blue"));
this->text->writeColored(20 * BLOCK, line1, " Time ", stringToColor("yellow"));
this->text->writeColored(26 * BLOCK, line1, timeTxt, stringToColor("bright_blue"));
const std::string roomsTxt = std::to_string(board->rooms / 100) + std::to_string((board->rooms % 100) / 10) + std::to_string(board->rooms % 10);
this->text->writeColored(22 * BLOCK, line2, "Rooms", stringToColor("yellow"));
this->text->writeColored(28 * BLOCK, line2, roomsTxt, stringToColor("bright_blue"));
}