X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Ftop10scorescreen.cpp;fp=bigscreen%2Ftop10scorescreen.cpp;h=2ac1cb0444afb58ff896270e71ddc4cfcdc25a29;hp=a9a52bf0d6335c5a919a4a7fae245937eb4e50d1;hb=ff69b9df8ab08323ef912c384542ad1ca8f6c79f;hpb=cae2b6192bd186ffdfc83ed11db8172bd1a804f5 diff --git a/bigscreen/top10scorescreen.cpp b/bigscreen/top10scorescreen.cpp index a9a52bf..2ac1cb0 100644 --- a/bigscreen/top10scorescreen.cpp +++ b/bigscreen/top10scorescreen.cpp @@ -66,18 +66,25 @@ void Top10ScoreScreen::draw(unsigned char *buf, unsigned width, unsigned height) unsigned row = 1, y = 140; for (std::vector::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++);