unsigned row = 1, y = 140;
for (std::vector<TopScore>::const_iterator i = scores.begin(); i != scores.end(); ++i) {
+ std::string suffix;
+ if (row % 2 == 1) {
+ suffix = ".odd";
+ } else {
+ suffix = ".even";
+ }
+
char str[16];
- std::string heading_theme_element = "top10scores.rowheading";
- std::string nick_theme_element = "top10scores.nick";
- std::string songname_theme_element = "top10scores.songname";
- std::string frequency_theme_element = "top10scores.frequency";
+ std::string heading_theme_element = "top10scores.rowheading" + suffix;
+ std::string nick_theme_element = "top10scores.nick" + suffix;
+ std::string songname_theme_element = "top10scores.songname" + suffix;
+ std::string frequency_theme_element = "top10scores.frequency" + suffix;
// print new entries in red
if (seen_topscore.count(*i) == 0 && seen_topscore.size() > 0) {
- heading_theme_element = "top10scores.freshrowheading";
- nick_theme_element = "top10scores.freshnick";
- songname_theme_element = "top10scores.freshsongname";
- frequency_theme_element = "top10scores.freshfrequency";
+ heading_theme_element = "top10scores.freshrowheading" + suffix;
+ nick_theme_element = "top10scores.freshnick" + suffix;
+ songname_theme_element = "top10scores.freshsongname" + suffix;
+ frequency_theme_element = "top10scores.freshfrequency" + suffix;
}
std::sprintf(str, "%u", row++);
unsigned row = 1, y = 140;
for (std::vector<TopChosen>::const_iterator i = scores.begin(); i != scores.end(); ++i) {
+ std::string suffix;
+ if (row % 2 == 1) {
+ suffix = ".odd";
+ } else {
+ suffix = ".even";
+ }
+
char str[16];
- std::string heading_theme_element = "top5chosensongs.rowheading";
- std::string songname_theme_element = "top5chosensongs.songname";
- std::string frequency_theme_element = "top5chosensongs.frequency";
+ std::string heading_theme_element = "top5chosensongs.rowheading" + suffix;
+ std::string songname_theme_element = "top5chosensongs.songname" + suffix;
+ std::string frequency_theme_element = "top5chosensongs.frequency" + suffix;
// print new entries in red
if (seen_topchosen.count(*i) == 0 && seen_topchosen.size() > 0) {
- heading_theme_element = "top5chosensongs.freshrowheading";
- songname_theme_element = "top5chosensongs.freshsongname";
- frequency_theme_element = "top5chosensongs.freshfrequency";
+ heading_theme_element = "top5chosensongs.freshrowheading" + suffix;
+ songname_theme_element = "top5chosensongs.freshsongname" + suffix;
+ frequency_theme_element = "top5chosensongs.freshfrequency" + suffix;
}
std::sprintf(str, "%u", row++);