X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Fgroupscreen.cpp;h=2827a6af3a111121e515b30db3ee0409820290bd;hp=e410de9b15019b5331e18e4d43fbd056d29db0f5;hb=da6c03044674863de9f8a017010aa579b3b27a12;hpb=76f4b6a8faa67f10246f6fcaf963b3f78e4835fc diff --git a/bigscreen/groupscreen.cpp b/bigscreen/groupscreen.cpp index e410de9..2827a6a 100644 --- a/bigscreen/groupscreen.cpp +++ b/bigscreen/groupscreen.cpp @@ -1,5 +1,6 @@ #include "groupscreen.h" #include "fetch_group.h" +#include "fonts.h" GroupScreen::GroupScreen(pqxx::connection &conn, unsigned tournament, unsigned round, unsigned parallel) : tournament(tournament), round(tournament), parallel(parallel), scores_changed(conn, "scores"), conn(conn), valid(false) @@ -23,6 +24,22 @@ void GroupScreen::draw(unsigned char *buf) Group group; conn.perform(FetchGroup(tournament, round, parallel, &group)); + memset(buf, 0, 800 * 600 * 4); + + // just as a test, show all the players and the scores (no headings) + unsigned y = 50; + for (std::vector::const_iterator i = group.players.begin(); i != group.players.end(); ++i) { + my_draw_text(i->nick, buf, 20, y, true, 255, 255, 255); + + unsigned x = 90; + for (std::vector::const_iterator j = i->scores.begin(); j != i->scores.end(); ++j) { + my_draw_text(widestring("1234"), buf, x, y, true, 255, 255, 255); + x += 60; + } + + y += 20; + } + valid = true; }