add percentage on awards

This commit is contained in:
Anthony Calosa
2016-08-21 08:56:39 +08:00
parent 3cecc34a9c
commit 5be01a7577

View File

@@ -109,7 +109,11 @@ void GameStateAwards::Start()
if (!si->author.size())
sprintf(buf, _("%i cards.").c_str(), si->totalCards());
else if (si->year > 0 && si->total > 0)
sprintf(buf, _("%s (%i): %i/%i cards").c_str(), si->author.c_str(), si->year, si->totalCards(), si->total);
{
int pr = 0;
pr = (si->totalCards()*100)/si->total;
sprintf(buf, _("%s (%i): %i%s : %i/%i cards").c_str(), si->author.c_str(), si->year, pr,"%", si->totalCards(), si->total);
}
else if (si->year > 0)
sprintf(buf, _("%s (%i): %i cards").c_str(), si->author.c_str(), si->year, si->totalCards());
else