X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Ftop5chosenscreen.cpp;fp=bigscreen%2Ftop5chosenscreen.cpp;h=ccfbea9f4051e6297bfee4b43b42417b3eb49dfe;hp=32ca278fa39b17382f110136dbf9e2e9f41d2dbd;hb=ff69b9df8ab08323ef912c384542ad1ca8f6c79f;hpb=cae2b6192bd186ffdfc83ed11db8172bd1a804f5 diff --git a/bigscreen/top5chosenscreen.cpp b/bigscreen/top5chosenscreen.cpp index 32ca278..ccfbea9 100644 --- a/bigscreen/top5chosenscreen.cpp +++ b/bigscreen/top5chosenscreen.cpp @@ -64,16 +64,23 @@ void Top5ChosenScreen::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 = "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++);