From f113f8fae8a258c5fa76f7d025bdb0c30d758fd8 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Thu, 26 Jul 2018 14:46:02 +0200 Subject: Added a bunch of features. - The IC chatlog now goes from top to bottom. - The same chatlog can be set to a limit by putting 'log_maximum = 100', for example, into the config.ini file. - Reloading the theme checks for the log limit again. - If a message starts with '~~' (two tildes), it'll be centered (for testimony title usage). - Inline colour options: - Text between {curly braces} will appear orange. - Text between (parentheses) will appear blue. - Text between $dollar signs$ will appear green. - The symbols can still be got by putting a '\' in front of them. - I.e.: \{, \}, \(, \), \$, \\ --- courtroom.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 85554a0e..a4e08df6 100644 --- a/courtroom.h +++ b/courtroom.h @@ -32,6 +32,8 @@ #include #include +#include + class AOApplication; class Courtroom : public QMainWindow @@ -147,6 +149,26 @@ private: int m_viewport_width = 256; int m_viewport_height = 192; + bool first_message_sent = false; + int maximumMessages = 0; + + // This is for inline message-colouring. + enum INLINE_COLOURS { + INLINE_BLUE, + INLINE_GREEN, + INLINE_ORANGE + }; + + // A stack of inline colours. + std::stack inline_colour_stack; + + bool centre_text = false; + + bool next_character_is_not_special = false; // If true, write the + // next character as it is. + + bool message_is_centered = false; + QVector char_list; QVector evidence_list; QVector music_list; -- cgit From 8c81a88e13560b08b5bac69f63a94800f9e42597 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Thu, 26 Jul 2018 23:19:32 +0200 Subject: Fixed a bug with inline blue, added whispering. Furthermore, there are no longer any checks on the yellow and the rainbow colours, they are available from the getgo. --- courtroom.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index a4e08df6..e1a32f0f 100644 --- a/courtroom.h +++ b/courtroom.h @@ -156,7 +156,8 @@ private: enum INLINE_COLOURS { INLINE_BLUE, INLINE_GREEN, - INLINE_ORANGE + INLINE_ORANGE, + INLINE_GREY }; // A stack of inline colours. -- cgit From 3295e5a78e55e1cc11b6ee705fff3ca54c2a02f6 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Thu, 26 Jul 2018 23:51:47 +0200 Subject: Text speed modifier. - 7 different speeds. - `{` turns the speed down. - `}` turns the speed up! --- courtroom.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index e1a32f0f..35171b47 100644 --- a/courtroom.h +++ b/courtroom.h @@ -170,6 +170,9 @@ private: bool message_is_centered = false; + int current_display_speed = 3; + int message_display_speed[7] = {30, 40, 50, 60, 75, 100, 120}; + QVector char_list; QVector evidence_list; QVector music_list; @@ -181,7 +184,7 @@ private: //determines how fast messages tick onto screen QTimer *chat_tick_timer; - int chat_tick_interval = 60; + //int chat_tick_interval = 60; //which tick position(character in chat message) we are at int tick_pos = 0; //used to determine how often blips sound -- cgit From 1b70d4d6dbc5090fde105ade1db57ed668d5e520 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sat, 28 Jul 2018 00:14:57 +0200 Subject: In-game log limit changer + enabling other full text colours. --- courtroom.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 35171b47..590de3d0 100644 --- a/courtroom.h +++ b/courtroom.h @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -369,6 +370,9 @@ private: AOImage *ui_muted; + QSpinBox *ui_log_limit_spinbox; + QLabel *ui_log_limit_label; + AOButton *ui_evidence_button; AOImage *ui_evidence; AOLineEdit *ui_evidence_name; @@ -482,6 +486,8 @@ private slots: void on_sfx_slider_moved(int p_value); void on_blip_slider_moved(int p_value); + void on_log_limit_changed(int value); + void on_ooc_toggle_clicked(); void on_witness_testimony_clicked(); -- cgit From c1807e0888c5851ab4fc2b419ec892a601792179 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sat, 28 Jul 2018 14:41:42 +0200 Subject: Max OOC name limited, unnecessary variable removed. --- courtroom.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 590de3d0..4569156c 100644 --- a/courtroom.h +++ b/courtroom.h @@ -164,8 +164,6 @@ private: // A stack of inline colours. std::stack inline_colour_stack; - bool centre_text = false; - bool next_character_is_not_special = false; // If true, write the // next character as it is. -- cgit From e8f07c68c2aec19f65318d4aa6241ebcb0f1ccf5 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sat, 28 Jul 2018 16:09:54 +0200 Subject: Allow changing of shownames. Don't forget to set the size and position of the name input in a theme. --- courtroom.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 4569156c..eb6638a4 100644 --- a/courtroom.h +++ b/courtroom.h @@ -210,7 +210,7 @@ private: //every time point in char.inis times this equals the final time const int time_mod = 40; - static const int chatmessage_size = 15; + static const int chatmessage_size = 16; QString m_chatmessage[chatmessage_size]; bool chatmessage_is_empty = false; @@ -311,6 +311,7 @@ private: QListWidget *ui_music_list; QLineEdit *ui_ic_chat_message; + QLineEdit *ui_ic_chat_name; QLineEdit *ui_ooc_chat_message; QLineEdit *ui_ooc_chat_name; -- cgit From 0561ae7fd6458a310d29e5cde4dfa30877365fcb Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sat, 28 Jul 2018 23:56:37 +0200 Subject: Allow the toggling of custom shownames. Don't forget to enable it in a theme. --- courtroom.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index eb6638a4..4b47558e 100644 --- a/courtroom.h +++ b/courtroom.h @@ -351,6 +351,8 @@ private: QCheckBox *ui_flip; QCheckBox *ui_guard; + QCheckBox *ui_showname_enable; + AOButton *ui_custom_objection; AOButton *ui_realization; AOButton *ui_mute; @@ -500,6 +502,8 @@ private slots: void on_flip_clicked(); void on_guard_clicked(); + void on_showname_enable_clicked(); + void on_evidence_button_clicked(); void on_evidence_delete_clicked(); -- cgit From f9baa0454d49d7da65a5c17afbb11aefa120e85a Mon Sep 17 00:00:00 2001 From: Cerapter Date: Tue, 7 Aug 2018 19:28:05 +0200 Subject: Log limit bugfixes. - Log limit is now correctly applied in both directions. - Log direction now cannot be changed by rewriting the ini mid-game. --- courtroom.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 4b47558e..b3342db8 100644 --- a/courtroom.h +++ b/courtroom.h @@ -193,6 +193,12 @@ private: bool rainbow_appended = false; bool blank_blip = false; + // Used for getting the current maximum blocks allowed in the IC chatlog. + int log_maximum_blocks = 0; + + // True, if the log should go downwards. + bool log_goes_downwards = false; + //delay before chat messages starts ticking QTimer *text_delay_timer; -- cgit From eca2cd02f41ae5496a0cb1f393fe82c44e593603 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Tue, 7 Aug 2018 21:10:47 +0200 Subject: Inline blue text now stops the character from talking. --- courtroom.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index b3342db8..df0883cf 100644 --- a/courtroom.h +++ b/courtroom.h @@ -172,6 +172,14 @@ private: int current_display_speed = 3; int message_display_speed[7] = {30, 40, 50, 60, 75, 100, 120}; + // This is for checking if the character should start talking again + // when an inline blue text ends. + bool entire_message_is_blue = false; + + // And this is the inline 'talking checker'. Counts how 'deep' we are + // in inline blues. + int inline_blue_depth = 0; + QVector char_list; QVector evidence_list; QVector music_list; -- cgit From 0f2665aabed04f0fe68b1104a0b5df05d0525d01 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Thu, 9 Aug 2018 21:23:30 +0200 Subject: Settings menu avaiable through ingame means + IC beautification. - Changing songs is now done in italics. --- courtroom.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index df0883cf..22d25868 100644 --- a/courtroom.h +++ b/courtroom.h @@ -121,6 +121,9 @@ public: // or the user isn't already scrolled to the top void append_ic_text(QString p_text, QString p_name = ""); + // This is essentially the same as the above, but specifically for song changes. + void append_ic_songchange(QString p_songname, QString p_name = ""); + //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); @@ -360,6 +363,7 @@ private: AOButton *ui_change_character; AOButton *ui_reload_theme; AOButton *ui_call_mod; + AOButton *ui_settings; QCheckBox *ui_pre; QCheckBox *ui_flip; @@ -511,6 +515,7 @@ private slots: void on_change_character_clicked(); void on_reload_theme_clicked(); void on_call_mod_clicked(); + void on_settings_clicked(); void on_pre_clicked(); void on_flip_clicked(); -- cgit From b8dc30a822c57a3e3ee1995423b161e0fec0a3e4 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Mon, 13 Aug 2018 18:08:43 +0200 Subject: The game now keeps every character's icon in memory for a fast character sceen. Additionally, the loading at the beginning is smoother. --- courtroom.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 22d25868..eb8943e2 100644 --- a/courtroom.h +++ b/courtroom.h @@ -47,6 +47,8 @@ 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 character_loading_finished(); + //sets position of widgets based on theme ini files void set_widgets(); //sets font size based on theme ini files @@ -272,6 +274,9 @@ private: int char_rows = 9; int max_chars_on_page = 90; + const int button_width = 60; + const int button_height = 60; + int current_emote_page = 0; int current_emote = 0; int emote_columns = 5; @@ -427,6 +432,7 @@ private: void construct_char_select(); void set_char_select(); void set_char_select_page(); + void put_button_in_place(int starting, int chars_on_this_page); void construct_emotes(); void set_emote_page(); -- cgit From 2aec9710e5c83fe45d643307bad0f6dcbdf2f831 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Mon, 13 Aug 2018 21:56:02 +0200 Subject: Added character filtering options to the char. select. screen. - Filtering by name. - Filtering by availability. - Filtering by being passworded (though this is unimplemented in AO). --- courtroom.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index eb8943e2..1cc2ed4a 100644 --- a/courtroom.h +++ b/courtroom.h @@ -418,6 +418,7 @@ private: QWidget *ui_char_buttons; QVector ui_char_button_list; + QVector ui_char_button_list_filtered; AOImage *ui_selector; AOButton *ui_back_to_lobby; @@ -429,10 +430,15 @@ 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(); void put_button_in_place(int starting, int chars_on_this_page); + void filter_character_list(); void construct_emotes(); void set_emote_page(); @@ -538,6 +544,9 @@ private slots: void on_char_select_left_clicked(); void on_char_select_right_clicked(); + void on_char_search_changed(const QString& newtext); + void on_char_taken_clicked(int newstate); + void on_char_passworded_clicked(int newstate); void on_spectator_clicked(); -- cgit From 0f8cb919e289d433d8a7e84b16b934c2b04c7dd2 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Tue, 14 Aug 2018 17:06:23 +0200 Subject: Fixed a bug where the music being played would depend on the row selected. --- courtroom.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 1cc2ed4a..8a93543d 100644 --- a/courtroom.h +++ b/courtroom.h @@ -191,6 +191,8 @@ private: QSignalMapper *char_button_mapper; + QVector music_row_to_number; + //triggers ping_server() every 60 seconds QTimer *keepalive_timer; -- cgit From 0368e7dc459b3057f8c7d0e6e329de0d3cd7c424 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Thu, 16 Aug 2018 20:04:19 +0200 Subject: Guilty / Not Guilty buttons for the judge position. --- courtroom.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 8a93543d..3cb3c10a 100644 --- a/courtroom.h +++ b/courtroom.h @@ -133,7 +133,7 @@ public: void play_preanim(); //plays the witness testimony or cross examination animation based on argument - void handle_wtce(QString p_wtce); + void handle_wtce(QString p_wtce, int variant); //sets the hp bar of defense(p_bar 1) or pro(p_bar 2) //state is an number between 0 and 10 inclusive @@ -366,6 +366,8 @@ private: AOButton *ui_witness_testimony; AOButton *ui_cross_examination; + AOButton *ui_guilty; + AOButton *ui_not_guilty; AOButton *ui_change_character; AOButton *ui_reload_theme; @@ -525,6 +527,8 @@ private slots: void on_witness_testimony_clicked(); void on_cross_examination_clicked(); + void on_not_guilty_clicked(); + void on_guilty_clicked(); void on_change_character_clicked(); void on_reload_theme_clicked(); -- cgit From c316e81e0c28a5f62e55f4a727f0ca152ab9874b Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sun, 19 Aug 2018 09:19:18 +0200 Subject: Reset the default background to `default`. Reimplementation of `bed0b55e70f13adf772584fc0d31ebfe59597115` from old origin. --- courtroom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 3cb3c10a..8dfa54ad 100644 --- a/courtroom.h +++ b/courtroom.h @@ -299,7 +299,7 @@ private: //whether the ooc chat is server or master chat, true is server bool server_ooc = true; - QString current_background = "gs4"; + QString current_background = "default"; AOMusicPlayer *music_player; AOSfxPlayer *sfx_player; -- cgit From d314b8dd07f72d94724c3902258dfb2641d3435c Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sun, 19 Aug 2018 09:37:34 +0200 Subject: Moved includes out of the CPP files into the header files. Reimplementation of `30a87d23c9c63bed072b3460e7482075dc530b2c` from the old origin. --- courtroom.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 8dfa54ad..d618862d 100644 --- a/courtroom.h +++ b/courtroom.h @@ -33,6 +33,15 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include + #include class AOApplication; -- cgit From 739142f8ddd194b7f4ed42fe813979655d04262a Mon Sep 17 00:00:00 2001 From: Cerapter Date: Mon, 3 Sep 2018 03:52:16 +0200 Subject: Dual characters on screen Part I The basics have been laid out. - Communication about the second character established. - Pairing sytem made. - Placement system of the second character implemented. Needs: - More testing. - A workable UI. - Fix for zooms. --- courtroom.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index d618862d..ad00b725 100644 --- a/courtroom.h +++ b/courtroom.h @@ -194,6 +194,12 @@ private: // in inline blues. int inline_blue_depth = 0; + // The character ID of the character this user wants to appear alongside with. + int other_charid = -1; + + // The offset this user has given if they want to appear alongside someone. + int offset_with_pair = 0; + QVector char_list; QVector evidence_list; QVector music_list; @@ -240,7 +246,7 @@ private: //every time point in char.inis times this equals the final time const int time_mod = 40; - static const int chatmessage_size = 16; + static const int chatmessage_size = 21; QString m_chatmessage[chatmessage_size]; bool chatmessage_is_empty = false; @@ -323,6 +329,7 @@ private: AOScene *ui_vp_background; AOMovie *ui_vp_speedlines; AOCharMovie *ui_vp_player_char; + AOCharMovie *ui_vp_sideplayer_char; AOScene *ui_vp_desk; AOScene *ui_vp_legacy_desk; AOEvidenceDisplay *ui_vp_evidence_display; -- cgit From 22e0cb8e1a97e57a6235c23afc6508f5e441aefc Mon Sep 17 00:00:00 2001 From: Cerapter Date: Mon, 3 Sep 2018 12:55:57 +0200 Subject: Dual characters on screen Part 2. - UI option to change pairup. - Fixed a bug on the prosecution side. - Dual characters now allow for iniswapped characters. - Zooming now doesn't stay on the field, instead, the game defaults to the last emote. --- courtroom.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index ad00b725..194298f6 100644 --- a/courtroom.h +++ b/courtroom.h @@ -85,6 +85,9 @@ public: //sets the local mute list based on characters available on the server void set_mute_list(); + // Sets the local pair list based on the characters available on the server. + void set_pair_list(); + //sets desk and bg based on pos in chatmessage void set_scene(); @@ -246,7 +249,7 @@ private: //every time point in char.inis times this equals the final time const int time_mod = 40; - static const int chatmessage_size = 21; + static const int chatmessage_size = 22; QString m_chatmessage[chatmessage_size]; bool chatmessage_is_empty = false; @@ -350,6 +353,10 @@ private: QListWidget *ui_area_list; QListWidget *ui_music_list; + AOButton *ui_pair_button; + QListWidget *ui_pair_list; + QSpinBox *ui_pair_offset_spinbox; + QLineEdit *ui_ic_chat_message; QLineEdit *ui_ic_chat_name; @@ -487,6 +494,7 @@ private slots: void chat_tick(); void on_mute_list_clicked(QModelIndex p_index); + void on_pair_list_clicked(QModelIndex p_index); void on_chat_return_pressed(); @@ -525,6 +533,7 @@ private slots: void on_realization_clicked(); void on_mute_clicked(); + void on_pair_clicked(); void on_defense_minus_clicked(); void on_defense_plus_clicked(); @@ -538,6 +547,7 @@ private slots: void on_blip_slider_moved(int p_value); void on_log_limit_changed(int value); + void on_pair_offset_changed(int value); void on_ooc_toggle_clicked(); -- cgit From becf58dd4f9432364a64dc7af006b3938245127b Mon Sep 17 00:00:00 2001 From: Cerapter Date: Mon, 3 Sep 2018 15:55:34 +0200 Subject: Area list added. - Accessible with the ingame A/M button, or by `/switch_am`. - The music list now only lists music. - The area list lists the areas. - It describes general area properties (playercount, status, CM, locked). - Automatically updates as these change. - Clicking on an area behaves the same way as clicking on an area in the music list previously did. --- courtroom.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 194298f6..90cf21f0 100644 --- a/courtroom.h +++ b/courtroom.h @@ -55,6 +55,43 @@ public: void append_char(char_type p_char){char_list.append(p_char);} 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() + { + QString malplaced = area_list.last(); + area_list.removeLast(); + append_music(malplaced); + } + + void arup_append(int players, QString status, QString cm, bool locked) + { + arup_players.append(players); + arup_statuses.append(status); + arup_cms.append(cm); + arup_locks.append(locked); + } + + void arup_modify(int type, int place, QString value) + { + if (type == 0) + { + arup_players[place] = value.toInt(); + } + else if (type == 1) + { + arup_statuses[place] = value; + } + else if (type == 2) + { + arup_cms[place] = value; + } + else if (type == 3) + { + arup_locks[place] = (value == "True"); + } + list_areas(); + } void character_loading_finished(); @@ -118,6 +155,7 @@ public: //helper function that populates ui_music_list with the contents of music_list void list_music(); + void list_areas(); //these are for OOC chat void append_ms_chatmessage(QString f_name, QString f_message); @@ -206,10 +244,18 @@ private: QVector char_list; QVector evidence_list; QVector music_list; + QVector area_list; + + QVector arup_players; + QVector arup_statuses; + QVector arup_cms; + QVector arup_locks; QSignalMapper *char_button_mapper; + // These map music row items and area row items to their actual IDs. QVector music_row_to_number; + QVector area_row_to_number; //triggers ping_server() every 60 seconds QTimer *keepalive_timer; @@ -396,6 +442,7 @@ private: AOButton *ui_reload_theme; AOButton *ui_call_mod; AOButton *ui_settings; + AOButton *ui_switch_area_music; QCheckBox *ui_pre; QCheckBox *ui_flip; @@ -502,6 +549,7 @@ private slots: void on_music_search_edited(QString p_text); void on_music_list_double_clicked(QModelIndex p_model); + void on_area_list_double_clicked(QModelIndex p_model); void select_emote(int p_id); @@ -584,6 +632,8 @@ private slots: void char_clicked(int n_char); + void on_switch_area_music_clicked(); + void ping_server(); }; -- cgit From 78c339869d64295da3d6aef5577a16f7fdc49b78 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Wed, 5 Sep 2018 02:25:04 +0200 Subject: Inline text now also obey `misc` rules. --- courtroom.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 90cf21f0..19a19ea9 100644 --- a/courtroom.h +++ b/courtroom.h @@ -131,6 +131,9 @@ public: //sets text color based on text color in chatmessage void set_text_color(); + // And gets the colour, too! + QColor get_text_color(QString color); + //takes in serverD-formatted IP list as prints a converted version to server OOC //admittedly poorly named void set_ip_list(QString p_list); -- cgit From 93cd2ad3747ff609e0aa2175a2622afe9ef6b56d Mon Sep 17 00:00:00 2001 From: Cerapter Date: Wed, 5 Sep 2018 17:21:27 +0200 Subject: Non-interrupting pres. --- courtroom.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 19a19ea9..d15dde0e 100644 --- a/courtroom.h +++ b/courtroom.h @@ -184,6 +184,7 @@ public: void handle_song(QStringList *p_contents); void play_preanim(); + void play_noninterrupting_preanim(); //plays the witness testimony or cross examination animation based on argument void handle_wtce(QString p_wtce, int variant); @@ -298,7 +299,7 @@ private: //every time point in char.inis times this equals the final time const int time_mod = 40; - static const int chatmessage_size = 22; + static const int chatmessage_size = 23; QString m_chatmessage[chatmessage_size]; bool chatmessage_is_empty = false; @@ -319,7 +320,7 @@ private: bool is_muted = false; - //state of animation, 0 = objecting, 1 = preanim, 2 = talking, 3 = idle + //state of animation, 0 = objecting, 1 = preanim, 2 = talking, 3 = idle, 4 = noniterrupting preanim int anim_state = 3; //state of text ticking, 0 = not yet ticking, 1 = ticking in progress, 2 = ticking done @@ -451,6 +452,7 @@ private: QCheckBox *ui_flip; QCheckBox *ui_guard; + QCheckBox *ui_pre_non_interrupt; QCheckBox *ui_showname_enable; AOButton *ui_custom_objection; -- cgit From fcd8f5b5abb2329aded120007319d581908c8a69 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sat, 15 Sep 2018 02:33:18 +0200 Subject: Areas can now be spectatable, too. - Makes it so that people can join, but can't type IC unless invited. - The CM can set it with `/area_spectate`. --- courtroom.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index d15dde0e..3e1b2690 100644 --- a/courtroom.h +++ b/courtroom.h @@ -64,7 +64,7 @@ public: append_music(malplaced); } - void arup_append(int players, QString status, QString cm, bool locked) + void arup_append(int players, QString status, QString cm, QString locked) { arup_players.append(players); arup_statuses.append(status); @@ -88,7 +88,7 @@ public: } else if (type == 3) { - arup_locks[place] = (value == "True"); + arup_locks[place] = value; } list_areas(); } @@ -253,7 +253,7 @@ private: QVector arup_players; QVector arup_statuses; QVector arup_cms; - QVector arup_locks; + QVector arup_locks; QSignalMapper *char_button_mapper; -- cgit From d54064d892c26a26641e6ed67412b33d7db3f6c2 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sat, 15 Sep 2018 03:33:10 +0200 Subject: Server messages are now coloured differently. --- courtroom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 3e1b2690..341d6dfd 100644 --- a/courtroom.h +++ b/courtroom.h @@ -162,7 +162,7 @@ public: //these are for OOC chat void append_ms_chatmessage(QString f_name, QString f_message); - void append_server_chatmessage(QString p_name, QString p_message); + void append_server_chatmessage(QString p_name, QString p_message, QString p_colour); //these functions handle chatmessages sequentially. //The process itself is very convoluted and merits separate documentation -- cgit From 29c91e63ea44a5e27b90fcf409ad9e4dc1f3f5c2 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Sat, 15 Sep 2018 12:35:01 +0200 Subject: The IC chatlog can now show both name and showname, and can be exported. - Toggle the 'Custom shownames' tickbox to switch between real names and custom shownames. - Type `/save_chatlog` in the OOC to export your IC chatlog into a file. - Exporting the chatlog will append the date and time of the message, too. --- courtroom.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 341d6dfd..1115e369 100644 --- a/courtroom.h +++ b/courtroom.h @@ -18,6 +18,7 @@ #include "aotextedit.h" #include "aoevidencedisplay.h" #include "datatypes.h" +#include "chatlogpiece.h" #include #include @@ -257,6 +258,8 @@ private: QSignalMapper *char_button_mapper; + QVector ic_chatlog_history; + // These map music row items and area row items to their actual IDs. QVector music_row_to_number; QVector area_row_to_number; -- cgit From ff0f8c268a36129635a8d9f459a9e511b599260f Mon Sep 17 00:00:00 2001 From: Cerapter Date: Thu, 20 Sep 2018 23:14:32 +0200 Subject: Full stops force the idle anim to play. --- courtroom.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 1115e369..4aa4f006 100644 --- a/courtroom.h +++ b/courtroom.h @@ -227,6 +227,8 @@ private: bool next_character_is_not_special = false; // If true, write the // next character as it is. + bool previous_character_is_fullstop = false; // Used for silencing the character during long ellipses. + bool message_is_centered = false; int current_display_speed = 3; -- cgit From 546d3c897031d2b6f1c36c4b9cd94e3b9e0e62b9 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Tue, 23 Oct 2018 09:33:58 +0200 Subject: Moved bassopus stuff to its own function. Not that it works, so whatever. --- courtroom.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 4aa4f006..1ee09cd9 100644 --- a/courtroom.h +++ b/courtroom.h @@ -645,6 +645,8 @@ private slots: void on_switch_area_music_clicked(); void ping_server(); + + void load_bass_opus_plugin(); }; #endif // COURTROOM_H -- cgit From 3844827724f5a65fff87ce861700471283317e47 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Tue, 23 Oct 2018 11:49:31 +0200 Subject: Fixed a bug regarding ARUP that caused crashes. --- courtroom.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 1ee09cd9..46a23d8f 100644 --- a/courtroom.h +++ b/courtroom.h @@ -77,19 +77,23 @@ public: { if (type == 0) { - arup_players[place] = value.toInt(); + if (arup_players.size() > place) + arup_players[place] = value.toInt(); } else if (type == 1) { - arup_statuses[place] = value; + if (arup_statuses.size() > place) + arup_statuses[place] = value; } else if (type == 2) { - arup_cms[place] = value; + if (arup_cms.size() > place) + arup_cms[place] = value; } else if (type == 3) { - arup_locks[place] = value; + if (arup_locks.size() > place) + arup_locks[place] = value; } list_areas(); } -- cgit From 660daf9922e68eb5f5f6bb00eb3bc51d0c460de7 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Tue, 23 Oct 2018 14:54:36 +0200 Subject: Client can now accept case alerts. - Settings has a new tab with casing settings. - Can set when the game should alert of cases. - In game tickbox to toggle if you should be alerted of cases. --- courtroom.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 46a23d8f..2b60db5b 100644 --- a/courtroom.h +++ b/courtroom.h @@ -460,6 +460,7 @@ private: QCheckBox *ui_pre; QCheckBox *ui_flip; QCheckBox *ui_guard; + QCheckBox *ui_casing; QCheckBox *ui_pre_non_interrupt; QCheckBox *ui_showname_enable; @@ -548,6 +549,8 @@ public slots: void mod_called(QString p_ip); + void case_called(QString msg, bool def, bool pro, bool jud, bool jur); + private slots: void start_chat_ticking(); void play_sfx(); @@ -648,6 +651,8 @@ private slots: void on_switch_area_music_clicked(); + void on_casing_clicked(); + void ping_server(); void load_bass_opus_plugin(); -- cgit From de8badc9a6e74ca29cbc04ab5438d6eed2eb8984 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Tue, 23 Oct 2018 16:15:15 +0200 Subject: Support for case alerts serverside. - Users can use an ingame button to alert people of cases. --- courtroom.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 2b60db5b..0dc7ba43 100644 --- a/courtroom.h +++ b/courtroom.h @@ -198,6 +198,8 @@ public: //state is an number between 0 and 10 inclusive void set_hp_bar(int p_bar, int p_state); + void announce_case(QString title, bool def, bool pro, bool jud, bool jur); + void check_connection_received(); ~Courtroom(); @@ -218,6 +220,7 @@ private: int maximumMessages = 0; // This is for inline message-colouring. + enum INLINE_COLOURS { INLINE_BLUE, INLINE_GREEN, @@ -455,6 +458,7 @@ private: AOButton *ui_reload_theme; AOButton *ui_call_mod; AOButton *ui_settings; + AOButton *ui_announce_casing; AOButton *ui_switch_area_music; QCheckBox *ui_pre; @@ -536,8 +540,6 @@ private: void construct_evidence(); void set_evidence_page(); - - public slots: void objection_done(); void preanim_done(); @@ -625,6 +627,7 @@ private slots: void on_reload_theme_clicked(); void on_call_mod_clicked(); void on_settings_clicked(); + void on_announce_casing_clicked(); void on_pre_clicked(); void on_flip_clicked(); -- cgit From 962289793d97357b69e228a0b52737681d2ea0b0 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Tue, 23 Oct 2018 16:34:39 +0200 Subject: Added support for the stenographer role in case alerts. --- courtroom.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 0dc7ba43..a27d902c 100644 --- a/courtroom.h +++ b/courtroom.h @@ -198,7 +198,7 @@ public: //state is an number between 0 and 10 inclusive void set_hp_bar(int p_bar, int p_state); - void announce_case(QString title, bool def, bool pro, bool jud, bool jur); + void announce_case(QString title, bool def, bool pro, bool jud, bool jur, bool steno); void check_connection_received(); @@ -551,7 +551,7 @@ public slots: void mod_called(QString p_ip); - void case_called(QString msg, bool def, bool pro, bool jud, bool jur); + void case_called(QString msg, bool def, bool pro, bool jud, bool jur, bool steno); private slots: void start_chat_ticking(); -- cgit From e8bb1f1e490e52bbfad2bbf75c56f20109a28926 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Fri, 2 Nov 2018 15:15:07 +0100 Subject: Reverted the full stop silence feature. With 3D characters, it made the game lag too much -- really wasn't worth it. --- courtroom.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index a27d902c..264470c6 100644 --- a/courtroom.h +++ b/courtroom.h @@ -234,8 +234,6 @@ private: bool next_character_is_not_special = false; // If true, write the // next character as it is. - bool previous_character_is_fullstop = false; // Used for silencing the character during long ellipses. - bool message_is_centered = false; int current_display_speed = 3; -- cgit From 11c2f258ebf48f515cdba5c7ae9cccec447604dd Mon Sep 17 00:00:00 2001 From: David Skoland Date: Fri, 16 Nov 2018 01:02:55 +0100 Subject: removed legacy for char icons --- courtroom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 2cc099ce..3c937b96 100644 --- a/courtroom.h +++ b/courtroom.h @@ -102,7 +102,7 @@ public: //implementations in path_functions.cpp QString get_background_path(); - QString get_default_background_path(); + QString get_default_background_path(QString p_file); //cid = character id, returns the cid of the currently selected character int get_cid() {return m_cid;} -- cgit From 8ffdd2afb84ec483160f156d24cf786165a9506c Mon Sep 17 00:00:00 2001 From: David Skoland Date: Fri, 16 Nov 2018 02:01:08 +0100 Subject: refactored path functions and added support for case-sensitive filesystems --- courtroom.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 3c937b96..286ae7ef 100644 --- a/courtroom.h +++ b/courtroom.h @@ -100,13 +100,10 @@ public: //send a message that the player is banned and quits the server void set_ban(int p_cid); - //implementations in path_functions.cpp - QString get_background_path(); - QString get_default_background_path(QString p_file); - //cid = character id, returns the cid of the currently selected character int get_cid() {return m_cid;} QString get_current_char() {return current_char;} + QString get_current_background() {return current_background;} //properly sets up some varibles: resets user state void enter_courtroom(int p_cid); -- cgit From c5d983033ec967b644e7ed9bd1a0f5a1b4f428c3 Mon Sep 17 00:00:00 2001 From: Cerapter Date: Wed, 12 Dec 2018 19:46:13 +0100 Subject: Merged some duplicate functions. Also brought in another function that specifically filters out inline formatting characters, so that the append IC text function is a bit more understandable. --- courtroom.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'courtroom.h') diff --git a/courtroom.h b/courtroom.h index 85c454a7..0b5c0ea9 100644 --- a/courtroom.h +++ b/courtroom.h @@ -179,20 +179,20 @@ public: void handle_chatmessage_2(); void handle_chatmessage_3(); + //This function filters out the common CC inline text trickery, for appending to + //the IC chatlog. + QString filter_ic_text(QString p_text); + //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 = ""); - - // This is essentially the same as the above, but specifically for song changes. - void append_ic_songchange(QString p_songname, QString p_name = ""); + void append_ic_text(QString p_text, QString p_name = "", bool is_songchange = false); //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(); - void play_noninterrupting_preanim(); + void play_preanim(bool noninterrupting); //plays the witness testimony or cross examination animation based on argument void handle_wtce(QString p_wtce, int variant); -- cgit