X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Fgroupscreen.h;h=9c32629a7cbc60232a1b7f08d26a8448434df622;hp=fb27787b34813e1ca39f6708aed6cec7a610c899;hb=ebac39647fc6d0005380d4b9ebd10f1157eb7fd1;hpb=09ae4d8636130d4c86ab3f8df8f823482f948f97 diff --git a/bigscreen/groupscreen.h b/bigscreen/groupscreen.h index fb27787..9c32629 100644 --- a/bigscreen/groupscreen.h +++ b/bigscreen/groupscreen.h @@ -14,15 +14,25 @@ /* A screen class showing a group in the tournament */ class GroupScreen : public GenericScreen { private: - unsigned tournament, round, parallel, machine, num_machines; + unsigned tournament, round, parallel, machine, num_machines, players_per_machine; FlagTrigger scores_changed; pqxx::connection &conn; bool valid; struct timeval last_updated; std::vector last_text; + unsigned get_show_players(const Group &group); + void draw_main_heading(std::vector &td); + void draw_column_headings(std::vector &td, const Group &group, const std::vector &colwidth); + void draw_scores(std::vector &td, const Group &group, const std::vector &colwidth); + void draw_next_up_single(unsigned char *buf, const Group &group, const std::vector &colwidth, + std::map &song_scores, std::map &player_scores, + const std::vector &max_score, const std::vector &min_score); + void find_column_widths(const Group &group, std::vector &colwidth); + public: - GroupScreen(pqxx::connection &conn, unsigned tournament, unsigned round, unsigned parallel, unsigned machine, unsigned num_machines); + // the last two parameters should probably not be there, but fetched from GroupScreen itself + GroupScreen(pqxx::connection &conn, unsigned tournament, unsigned round, unsigned parallel, unsigned machine, unsigned num_machines, unsigned players_per_machine); virtual ~GroupScreen(); bool check_invalidated();