diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/aoapplication.h | 21 | ||||
| -rw-r--r-- | include/aomovie.h | 6 | ||||
| -rw-r--r-- | include/aooptionsdialog.h | 21 | ||||
| -rw-r--r-- | include/aoscene.h | 2 | ||||
| -rw-r--r-- | include/aotextarea.h | 3 | ||||
| -rw-r--r-- | include/chatlogpiece.h | 9 | ||||
| -rw-r--r-- | include/courtroom.h | 80 | ||||
| -rw-r--r-- | include/lobby.h | 2 |
8 files changed, 108 insertions, 36 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h index 03aa01a1..3d4cc0eb 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -182,10 +182,16 @@ public: // from the config.ini. bool is_shakeandflash_enabled(); + // Returns whether evidence should be maintained ic + bool is_keepevi_enabled(); + // Returns the value of the maximum amount of lines the IC chatlog // may contain, from config.ini. int get_max_log_size(); + // Gets the punctuation delay modifier + int get_pundelay(); + // Returns whether the log should go upwards (new behaviour) // or downwards (vanilla behaviour). bool get_log_goes_downwards(); @@ -238,7 +244,11 @@ public: //Figure out if we can opus this or if we should fall back to wav QString get_sfx_suffix(QString sound_to_check); - // Can we use APNG for this? If not, fall back to a gif. + // figure out if we can find what prefix this song uses + QString get_music_prefix(QString song_to_check); + + // Can we use APNG for this? If not, WEBP? if not, GIF? If not, fall back to a
+ // gif.
QString get_image_suffix(QString path_to_check); //Returns the value of p_search_line within target_tag and terminator_tag @@ -341,6 +351,15 @@ public: // Get the message for the CM for casing alerts. QString get_casing_can_host_cases(); + // Get if html for ic log is enabled + bool get_colored_iclog_enabled(); + + // Get if ic log mirror is enabled + bool get_iclmir_enabled(); + + // Get if only inline coloring should be shown in log + bool colorlog_restricted_enabled(); + private: const int RELEASE = 2; const int MAJOR_VERSION = 7; diff --git a/include/aomovie.h b/include/aomovie.h index 1f278bf8..7ffad25d 100644 --- a/include/aomovie.h +++ b/include/aomovie.h @@ -15,13 +15,16 @@ public: AOMovie(QWidget *p_parent, AOApplication *p_ao_app); void set_play_once(bool p_play_once); - void play(QString p_gif, QString p_char = "", QString p_custom_theme = ""); + void start_timer(int delay); + void play(QString p_gif, QString p_char = "", QString p_custom_theme = "", + int default_duration = 0); void combo_resize(int w, int h); void stop(); private: QMovie *m_movie; AOApplication *ao_app; + QTimer *timer; bool play_once = true; signals: @@ -29,6 +32,7 @@ signals: private slots: void frame_change(int n_frame); + void timer_done(); }; #endif // AOMOVIE_H diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h index 233d079a..90d35474 100644 --- a/include/aooptionsdialog.h +++ b/include/aooptionsdialog.h @@ -51,6 +51,8 @@ private: QCheckBox *ui_downwards_cb; QLabel *ui_length_lbl; QSpinBox *ui_length_spinbox; + QLabel *ui_pun_delay;
+ QSpinBox *ui_pun_delay_spinbox;
QFrame *ui_log_names_divider; QLineEdit *ui_username_textbox; QLabel *ui_username_lbl; @@ -66,6 +68,12 @@ private: QLabel *ui_language_label; QComboBox *ui_language_combobox; + QLabel *ui_keepevi_lbl;
+ QCheckBox *ui_keepevi_cb;
+
+ QLabel *ui_keepcobj_lbl;
+ QCheckBox *ui_keepcobj_cb;
+
QWidget *ui_callwords_tab; QWidget *ui_callwords_widget; QVBoxLayout *ui_callwords_layout; @@ -119,7 +127,18 @@ private: QLabel *ui_casing_cm_cases_lbl; QLineEdit *ui_casing_cm_cases_textbox; - bool needs_default_audiodev(); + QWidget *ui_other_tab; + QWidget *ui_other_widget; + QFormLayout *ui_other_layout; + QLabel *ui_other_fancy_icl_enabled_lb; + QCheckBox *ui_other_fancy_icl_enabled_cb; + QLabel *ui_other_mirror_icl_enabled_lb; + QCheckBox *ui_other_mirror_icl_enabled_cb; + + QLabel *ui_other_fancy_icl_limit_lb; + QCheckBox *ui_other_fancy_icl_limit_cb; + + bool needs_default_audiodev();
signals: diff --git a/include/aoscene.h b/include/aoscene.h index b58c0fd0..29a44b02 100644 --- a/include/aoscene.h +++ b/include/aoscene.h @@ -21,7 +21,7 @@ private: QWidget *m_parent; QMovie *m_movie; AOApplication *ao_app; - + QString last_image; }; #endif // AOSCENE_H diff --git a/include/aotextarea.h b/include/aotextarea.h index d44596b2..ae28564f 100644 --- a/include/aotextarea.h +++ b/include/aotextarea.h @@ -12,7 +12,8 @@ class AOTextArea : public QTextBrowser public: AOTextArea(QWidget *p_parent = nullptr); - void append_chatmessage(QString p_name, QString p_message, QString p_colour); + void append_chatmessage(QString p_name, QString p_message, QString p_colour, + bool song); void append_error(QString p_message); private: diff --git a/include/chatlogpiece.h b/include/chatlogpiece.h index 34c5926b..945a7bc9 100644 --- a/include/chatlogpiece.h +++ b/include/chatlogpiece.h @@ -8,15 +8,17 @@ class chatlogpiece { public: chatlogpiece(); - chatlogpiece(QString p_name, QString p_showname, QString p_message, bool p_song); - chatlogpiece(QString p_name, QString p_showname, QString p_message, bool p_song, QDateTime p_datetime); - + chatlogpiece(QString p_name, QString p_showname, QString p_message, + bool p_song, int color); + chatlogpiece(QString p_name, QString p_showname, QString p_message, + bool p_song, int color, QDateTime p_datetime); QString get_name(); QString get_showname(); QString get_message(); bool get_is_song(); QDateTime get_datetime(); QString get_datetime_as_string(); + int get_chat_color(); QString get_full(); @@ -26,6 +28,7 @@ private: QString message; QDateTime datetime; bool is_song; + int color; }; #endif // CHATLOGPIECE_H diff --git a/include/courtroom.h b/include/courtroom.h index 74374c99..26380aa4 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -223,15 +223,18 @@ public: //This function filters out the common CC inline text trickery, for appending to //the IC chatlog. - QString filter_ic_text(QString p_text); + QString filter_ic_text(QString p_text, bool skip_filter, int chat_color); //adds text to the IC chatlog. p_name first as bold then p_text then a newlin //this function keeps the chatlog scrolled to the top unless there's text selected // or the user isn't already scrolled to the top - void append_ic_text(QString p_text, QString p_name = "", bool is_songchange = false); + void append_ic_text(QString p_text, QString p_name = "", + bool is_songchange = false, bool force_filter = false, + bool skip_filter = false, int chat_color = 0); - //prints who played the song to IC chat and plays said song(if found on local filesystem) - //takes in a list where the first element is the song name and the second is the char id of who played it + // prints who played the song to IC chat and plays said song(if found on local
+ // filesystem) takes in a list where the first element is the song name and
+ // the second is the char id of who played it
void handle_song(QStringList *p_contents); void play_preanim(bool noninterrupting); @@ -251,6 +254,7 @@ public: void check_connection_received(); void doScreenShake(); void doRealization(); + void refresh_iclog(bool skiplast); ~Courtroom(); @@ -331,6 +335,8 @@ private: bool rainbow_appended = false; bool blank_blip = false; + // The cursor to write with in mirror mode + QTextCursor *mirror_cursor; // Used for getting the current maximum blocks allowed in the IC chatlog. int log_maximum_blocks = 0; @@ -346,28 +352,27 @@ private: //keeps track of how long realization is visible(it's just a white square and should be visible less than a second) QTimer *realization_timer; - //times how long the blinking testimony should be shown(green one in the corner) - QTimer *testimony_show_timer; - //times how long the blinking testimony should be hidden - QTimer *testimony_hide_timer; - //every time point in char.inis times this equals the final time const int time_mod = 40; + // the amount of time non-animated objection/hold it/takethat images stay + // onscreen for in ms + const int shout_stay_time = 724; + + // the amount of time non-animated guilty/not guilty images stay onscreen for + // in ms + const int verdict_stay_time = 3000; + + // the amount of time non-animated witness testimony/cross-examination images + // stay onscreen for in ms + const int wtce_stay_time = 1500; + static const int chatmessage_size = 28; QString m_chatmessage[chatmessage_size]; bool chatmessage_is_empty = false; QString previous_ic_message = ""; - bool testimony_in_progress = false; - - //in milliseconds - const int testimony_show_time = 1500; - - //in milliseconds - const int testimony_hide_time = 500; - //char id, muted or not QMap<int, bool> mute_map; @@ -381,10 +386,21 @@ private: //state of text ticking, 0 = not yet ticking, 1 = ticking in progress, 2 = ticking done int text_state = 2; - //character id, which index of the char_list the player is + // characters we consider punctuation + const QString punctuation_chars = ".,?!:;"; + + // amount by which we multiply the delay when we parse punctuation chars + int punctuation_modifier = 2; + + // 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 char_name = ""; int objection_state = 0; + bool keep_custom_objection = false; + QString objection_custom = ""; int realization_state = 0; int screenshake_state = 0; int text_color = 0; @@ -429,6 +445,8 @@ private: //whether the ooc chat is server or master chat, true is server bool server_ooc = true; + // Is AFK enabled + bool isafk = false; QString current_background = "default"; AOMusicPlayer *music_player; @@ -454,10 +472,17 @@ private: AOImage *ui_vp_chatbox; QLabel *ui_vp_showname; QTextEdit *ui_vp_message; - AOImage *ui_vp_testimony; - AOImage *ui_vp_realization; + AOMovie *ui_vp_realization; + AOMovie *ui_vp_testimony; AOMovie *ui_vp_wtce; AOMovie *ui_vp_objection; + void realization_done();
+ + bool colorf_iclog = false; + bool mirror_iclog = false; + bool colorf_limit = false; + + bool keep_evidence_display = false; QTextEdit *ui_ic_chatlog; @@ -466,7 +491,7 @@ private: QListWidget *ui_mute_list; QListWidget *ui_area_list; - QListWidget *ui_music_list; + QTreeWidget *ui_music_list; AOButton *ui_pair_button; QListWidget *ui_pair_list; @@ -480,6 +505,8 @@ private: //QLineEdit *ui_area_password; QLineEdit *ui_music_search; + QString music_search_par = ""; + QString area_search_par = ""; QWidget *ui_emotes; QVector<AOEmoteButton*> ui_emote_list; @@ -527,6 +554,8 @@ private: AOButton *ui_screenshake; AOButton *ui_mute; + QMenu *custom_obj_menu; + AOButton *ui_defense_plus; AOButton *ui_defense_minus; @@ -589,11 +618,6 @@ public slots: void objection_done(); void preanim_done(); - void realization_done(); - - void show_testimony(); - void hide_testimony(); - void mod_called(QString p_ip); void case_called(QString msg, bool def, bool pro, bool jud, bool jur, bool steno, bool witness); @@ -611,8 +635,9 @@ private slots: void on_ooc_return_pressed(); + void on_music_search_keypr(); void on_music_search_edited(QString p_text); - void on_music_list_double_clicked(QModelIndex p_model); + void on_music_list_double_clicked(QTreeWidgetItem *p_item, int column); void on_area_list_double_clicked(QModelIndex p_model); void select_emote(int p_id); @@ -641,6 +666,7 @@ private slots: void on_objection_clicked(); void on_take_that_clicked(); void on_custom_objection_clicked(); + void ShowContextMenu(const QPoint &pos); void on_realization_clicked(); void on_screenshake_clicked(); diff --git a/include/lobby.h b/include/lobby.h index d32debed..0dca3d6e 100644 --- a/include/lobby.h +++ b/include/lobby.h @@ -38,7 +38,7 @@ public: QString get_chatlog(); int get_selected_server(); void enable_connect_button(); - + void check_update(); void set_loading_value(int p_value); bool public_servers_selected = true; |
