aboutsummaryrefslogtreecommitdiff
path: root/include/courtroom.h
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2021-01-11 17:38:08 +0300
committerCrystalwarrior <varsash@gmail.com>2021-01-11 17:38:08 +0300
commit45c78ea5caf58b6b8494decc6021540c755fabd7 (patch)
tree88ecfe13caacf3831e870022749f3bf4acea2954 /include/courtroom.h
parent62532f0b643c5f7502f1f48781ec6ec338019275 (diff)
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
Diffstat (limited to 'include/courtroom.h')
-rw-r--r--include/courtroom.h15
1 files changed, 8 insertions, 7 deletions
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;