aboutsummaryrefslogtreecommitdiff
path: root/include/courtroom.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/courtroom.h')
-rw-r--r--include/courtroom.h93
1 files changed, 59 insertions, 34 deletions
diff --git a/include/courtroom.h b/include/courtroom.h
index f0b69967..587d9630 100644
--- a/include/courtroom.h
+++ b/include/courtroom.h
@@ -26,6 +26,7 @@
#include "datatypes.h"
#include "debug_functions.h"
#include "chatlogpiece.h"
+#include "aocharmovie.h"
#include <QMainWindow>
#include <QLineEdit>
@@ -39,7 +40,7 @@
#include <QMap>
#include <QTextBrowser>
#include <QSpinBox>
-
+#include <QMovie>
#include <QDebug>
#include <QScrollBar>
#include <QRegExp>
@@ -48,12 +49,23 @@
#include <QFont>
#include <QInputDialog>
#include <QFileDialog>
+#include <QWidget>
+#include <QPropertyAnimation>
+#include <QTransform>
+#include <QParallelAnimationGroup>
+#include <QtConcurrent/QtConcurrent>
+#include <QtConcurrent/QtConcurrentRun>
+#include <QThread>
+#include <QThreadPool>
+#include <QFuture>
+#include <QMetaObject>
+#include <QLayout>
#include <QTextBoundaryFinder>
#include <stack>
class AOApplication;
-
+class AOCharMovie;
class Courtroom : public QMainWindow
{
Q_OBJECT
@@ -64,15 +76,32 @@ public:
void append_evidence(evi_type p_evi){evidence_list.append(p_evi);}
void append_music(QString f_music){music_list.append(f_music);}
void append_area(QString f_area){area_list.append(f_area);}
-
- void fix_last_area()
+ void handle_failed_login();
+ QString threading_sfx = "";
+ QString threading_shake = "";
+ QString threading_flash = "";
+ QString threading_prefix = "";
+ //cid and this may differ in cases of ini-editing
+ QString current_char = "";
+ int current_emote = 0;
+ AOApplication *ao_app;
+ //abstract widget to hold char buttons
+ QWidget *ui_char_buttons;
+ QVector<char_type> char_list;
+ QVector<evi_type> evidence_list;
+ QVector<QString> music_list;
+ QVector<QString> area_list;
+ QSignalMapper *char_button_mapper;
+ QVector<AOCharButton*> ui_char_button_list;
+ QVector<AOCharButton*> ui_char_button_list_filtered;
+ QLineEdit *ui_char_search;
+ QCheckBox *ui_char_passworded;
+ QCheckBox *ui_char_taken;
+ void mt_pre_framegetter(int frameNumber);
+ void mt_framegetter(int frameNumber);
+ void reset_music_list()
{
- if (area_list.size() > 0)
- {
- QString malplaced = area_list.last();
- area_list.removeLast();
- append_music(malplaced);
- }
+ music_list.clear();
}
void arup_append(int players, QString status, QString cm, QString locked)
@@ -121,7 +150,7 @@ public:
//reads theme inis and sets size and pos based on the identifier
void set_size_and_pos(QWidget *p_widget, QString p_identifier);
-
+ QPoint get_theme_pos(QString p_identifier);
//sets status as taken on character with cid n_char and places proper shading on charselect
void set_taken(int n_char, bool p_taken);
@@ -168,6 +197,9 @@ public:
//properly sets up some varibles: resets user state
void enter_courtroom(int p_cid);
+ // mfw this didnt fucking exist yet
+ void set_character(int char_id);
+
//helper function that populates ui_music_list with the contents of music_list
void list_music();
void list_areas();
@@ -208,14 +240,15 @@ public:
//Toggles the judge buttons, whether they should appear or not.
void toggle_judge_buttons(bool is_on);
- void announce_case(QString title, bool def, bool pro, bool jud, bool jur, bool steno);
+ void announce_case(QString title, bool def, bool pro, bool jud, bool jur, bool steno, bool wit);
void check_connection_received();
+ void doScreenShake();
+ void doRealization();
~Courtroom();
private:
- AOApplication *ao_app;
int m_courtroom_width = 714;
int m_courtroom_height = 668;
@@ -228,7 +261,10 @@ private:
bool first_message_sent = false;
int maximumMessages = 0;
-
+ QPropertyAnimation *screenshake_animation;
+ QPropertyAnimation *chatbox_screenshake_animation;
+ QParallelAnimationGroup *screenshake_group;
+ QMovie *frame_emote_checker;
// This is for inline message-colouring.
enum INLINE_COLOURS {
@@ -247,7 +283,7 @@ private:
bool message_is_centered = false;
int current_display_speed = 3;
- int message_display_speed[7] = {30, 40, 50, 60, 75, 100, 120};
+ int message_display_speed[7] = {10, 20, 30, 40, 50, 60, 75};
// This is for checking if the character should start talking again
// when an inline blue text ends.
@@ -263,11 +299,6 @@ private:
// The offset this user has given if they want to appear alongside someone.
int offset_with_pair = 0;
- QVector<char_type> char_list;
- QVector<evi_type> evidence_list;
- QVector<QString> music_list;
- QVector<QString> area_list;
-
QVector<int> arup_players;
QVector<QString> arup_statuses;
QVector<QString> arup_cms;
@@ -317,7 +348,7 @@ private:
//every time point in char.inis times this equals the final time
const int time_mod = 40;
- static const int chatmessage_size = 23;
+ static const int chatmessage_size = 28;
QString m_chatmessage[chatmessage_size];
bool chatmessage_is_empty = false;
@@ -346,11 +377,10 @@ private:
//character id, which index of the char_list the player is
int m_cid = -1;
- //cid and this may differ in cases of ini-editing
- QString current_char = "";
int objection_state = 0;
int realization_state = 0;
+ int screenshake_state = 0;
int text_color = 0;
bool is_presenting_evidence = false;
@@ -366,7 +396,6 @@ private:
const int button_height = 60;
int current_emote_page = 0;
- int current_emote = 0;
int emote_columns = 5;
int emote_rows = 2;
int max_emotes_on_page = 10;
@@ -389,6 +418,9 @@ private:
AOMusicPlayer *music_player;
AOSfxPlayer *sfx_player;
+ AOSfxPlayer *misc_sfx_player;
+ AOSfxPlayer *frame_emote_sfx_player;
+ AOSfxPlayer *pair_frame_emote_sfx_player;
AOSfxPlayer *objection_player;
AOBlipPlayer *blip_player;
@@ -477,6 +509,7 @@ private:
AOButton *ui_custom_objection;
AOButton *ui_realization;
+ AOButton *ui_screenshake;
AOButton *ui_mute;
AOButton *ui_defense_plus;
@@ -513,11 +546,6 @@ private:
AOImage *ui_char_select_background;
- //abstract widget to hold char buttons
- QWidget *ui_char_buttons;
-
- QVector<AOCharButton*> ui_char_button_list;
- QVector<AOCharButton*> ui_char_button_list_filtered;
AOImage *ui_selector;
AOButton *ui_back_to_lobby;
@@ -529,10 +557,6 @@ private:
AOButton *ui_spectator;
- QLineEdit *ui_char_search;
- QCheckBox *ui_char_passworded;
- QCheckBox *ui_char_taken;
-
void construct_char_select();
void set_char_select();
void set_char_select_page();
@@ -558,7 +582,7 @@ public slots:
void mod_called(QString p_ip);
- void case_called(QString msg, bool def, bool pro, bool jud, bool jur, bool steno);
+ void case_called(QString msg, bool def, bool pro, bool jud, bool jur, bool steno, bool witness);
private slots:
void start_chat_ticking();
@@ -605,6 +629,7 @@ private slots:
void on_custom_objection_clicked();
void on_realization_clicked();
+ void on_screenshake_clicked();
void on_mute_clicked();
void on_pair_clicked();