forked from jaildesigner-jailgames/jaildoctors_dilemma
Invertido el separador del reloj
This commit is contained in:
@@ -110,7 +110,12 @@ void ScoreBoard::render()
|
||||
// Escribe los textos
|
||||
const clock_t clock = getTime();
|
||||
std::string itemsTxt = std::to_string(*items / 100) + std::to_string((*items % 100) / 10) + std::to_string(*items % 10);
|
||||
std::string timeTxt = std::to_string((clock.minutes % 60) / 10) + std::to_string(clock.minutes % 10) + ":" + std::to_string((clock.seconds % 60) / 10) + std::to_string(clock.seconds % 10);
|
||||
std::string separator = " ";
|
||||
if (clock.separator)
|
||||
{
|
||||
separator = ":";
|
||||
}
|
||||
std::string timeTxt = std::to_string((clock.minutes % 60) / 10) + std::to_string(clock.minutes % 10) + separator + std::to_string((clock.seconds % 60) / 10) + std::to_string(clock.seconds % 10);
|
||||
std::string text = "Items collected " + itemsTxt + " Time " + timeTxt;
|
||||
const color_t color = stringToColor("white");
|
||||
this->text->writeColored(BLOCK, 21 * BLOCK, text, color);
|
||||
@@ -131,5 +136,6 @@ ScoreBoard::clock_t ScoreBoard::getTime()
|
||||
time.hours = timeElapsed / 3600000;
|
||||
time.minutes = timeElapsed / 60000;
|
||||
time.seconds = timeElapsed / 1000;
|
||||
time.separator = (timeElapsed % 1000 <= 500);
|
||||
return time;
|
||||
}
|
||||
Reference in New Issue
Block a user