From 45c78ea5caf58b6b8494decc6021540c755fabd7 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Mon, 11 Jan 2021 17:38:08 +0300 Subject: Add "id" variable to the clock functions and properly parse the ID Implement scalable maximum clock count, right now it's at 5 clocks a theme can have max Theme "clock_" starts from 1 instead of 0 since users don't know when stuff starts at index 0 TODO: testing lol --- include/courtroom.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'include/courtroom.h') diff --git a/include/courtroom.h b/include/courtroom.h index 49243258..91606c38 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -255,12 +255,12 @@ public: void check_connection_received(); - void start_clock(); - void start_clock(qint64 msecs); - void set_clock(qint64 msecs); - void pause_clock(); - void stop_clock(); - void set_clock_visibility(bool visible); + void start_clock(int id); + void start_clock(int id, qint64 msecs); + void set_clock(int id, qint64 msecs); + void pause_clock(int id); + void stop_clock(int id); + void set_clock_visibility(int id, bool visible); qint64 pong(); // Truncates text so it fits within theme-specified boundaries and sets the tooltip to the full string @@ -563,7 +563,8 @@ private: ScrollText *ui_music_name; AOMovie *ui_music_display; - AOClockLabel *ui_clock; + static const int max_clocks = 5; + AOClockLabel *ui_clock[max_clocks]; AOButton *ui_pair_button; QListWidget *ui_pair_list; -- cgit