X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Ftop5chosenscreen.cpp;fp=bigscreen%2Ftop5chosenscreen.cpp;h=32ca278fa39b17382f110136dbf9e2e9f41d2dbd;hb=cae2b6192bd186ffdfc83ed11db8172bd1a804f5;hp=d63b724433cc70ac89f3e8fbc218044156b9ffc5;hpb=0cb3a2e995b53b8b3227e2d3a22c90300f090f3c;p=ccbs diff --git a/bigscreen/top5chosenscreen.cpp b/bigscreen/top5chosenscreen.cpp index d63b724..32ca278 100644 --- a/bigscreen/top5chosenscreen.cpp +++ b/bigscreen/top5chosenscreen.cpp @@ -65,28 +65,30 @@ 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) { char str[16]; - std::string theme_element = "data"; - std::string heading_theme_element = "rowheading"; + std::string heading_theme_element = "top5chosensongs.rowheading"; + std::string songname_theme_element = "top5chosensongs.songname"; + std::string frequency_theme_element = "top5chosensongs.frequency"; // print new entries in red if (seen_topchosen.count(*i) == 0 && seen_topchosen.size() > 0) { - theme_element = "freshdata"; - heading_theme_element = "freshrowheading"; + heading_theme_element = "top5chosensongs.freshrowheading"; + songname_theme_element = "top5chosensongs.freshsongname"; + frequency_theme_element = "top5chosensongs.freshfrequency"; } std::sprintf(str, "%u", row++); unsigned width = my_draw_text(str, NULL, 24.0, heading_theme_element); my_draw_text(str, buf, 24.0, heading_theme_element, RANK_X - width/2, y); - if (my_draw_text(i->title, NULL, 24.0, theme_element) > SONG_MAX_WIDTH) { - my_draw_text(i->shorttitle, buf, 24.0, theme_element, SONG_X, y); + if (my_draw_text(i->title, NULL, 24.0, songname_theme_element) > SONG_MAX_WIDTH) { + my_draw_text(i->shorttitle, buf, 24.0, songname_theme_element, SONG_X, y); } else { - my_draw_text(i->title, buf, 24.0, theme_element, SONG_X, y); + my_draw_text(i->title, buf, 24.0, songname_theme_element, SONG_X, y); } std::sprintf(str, "%u", i->frequency); - width = my_draw_text(str, NULL, 24.0, theme_element); - my_draw_text(str, buf, 24.0, theme_element, FREQUENCY_X - width/2, y); + width = my_draw_text(str, NULL, 24.0, frequency_theme_element); + my_draw_text(str, buf, 24.0, frequency_theme_element, FREQUENCY_X - width/2, y); y += 40; }