X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Fgroupscreen.h;h=b88debec24381e01b54c6218d6de2486f2c29b0f;hp=21ab17248e2bb4ab54056e9778d12a63f3d422a2;hb=b8e7570409d3dff7d17bb44da6e3ba8f5861ca29;hpb=876c65c3f4f828a54fa8041f5d68e3c4cae1d463 diff --git a/bigscreen/groupscreen.h b/bigscreen/groupscreen.h index 21ab172..b88debe 100644 --- a/bigscreen/groupscreen.h +++ b/bigscreen/groupscreen.h @@ -14,19 +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; + void draw_main_heading(std::vector &td); + void draw_column_headings(std::vector &td, const Group &group, const std::vector &colwidth); + 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(); - void draw(unsigned char *buf); + void draw(unsigned char *buf, unsigned width, unsigned height); + int get_priority(); }; #endif /* !defined(_GROUPSCREEN_H) */