add percentage on awards
This commit is contained in:
@@ -109,7 +109,11 @@ void GameStateAwards::Start()
|
|||||||
if (!si->author.size())
|
if (!si->author.size())
|
||||||
sprintf(buf, _("%i cards.").c_str(), si->totalCards());
|
sprintf(buf, _("%i cards.").c_str(), si->totalCards());
|
||||||
else if (si->year > 0 && si->total > 0)
|
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)
|
else if (si->year > 0)
|
||||||
sprintf(buf, _("%s (%i): %i cards").c_str(), si->author.c_str(), si->year, si->totalCards());
|
sprintf(buf, _("%s (%i): %i cards").c_str(), si->author.c_str(), si->year, si->totalCards());
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user