From 2eed786c776ba31e464e5929a6a0299a19897192 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Thu, 23 Dec 2021 17:29:17 -0600 Subject: Split logging option into text and demo Apparently, people don't like logging demos because it takes up too much space. It's possible to enable NTFS compression for demo files (or the entire demos folder), though. --- include/aoapplication.h | 7 +++++-- include/aooptionsdialog.h | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 0c5359a..957d7f6 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -504,8 +504,11 @@ public: // Get the message for the CM for casing alerts. QString get_casing_can_host_cases(); - // Get if automatic logging is enabled - bool get_auto_logging_enabled(); + // Get if text file logging is enabled + bool get_text_logging_enabled(); + + // Get if demo logging is enabled + bool get_demo_logging_enabled(); // Get the subtheme from settings QString get_subtheme(); diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h index 77d19a4..ac8f2f3 100644 --- a/include/aooptionsdialog.h +++ b/include/aooptionsdialog.h @@ -124,6 +124,12 @@ private: QLabel *ui_category_stop_lbl; QCheckBox *ui_category_stop_cb; + QLabel *ui_log_text_lbl; + QCheckBox *ui_log_text_cb; + + QLabel *ui_log_demo_lbl; + QCheckBox *ui_log_demo_cb; + QWidget *ui_callwords_tab; QWidget *ui_callwords_widget; QVBoxLayout *ui_callwords_layout; @@ -174,8 +180,6 @@ private: QCheckBox *ui_casing_cm_cb; QLabel *ui_casing_cm_cases_lbl; QLineEdit *ui_casing_cm_cases_textbox; - QLabel *ui_log_lbl; - QCheckBox *ui_log_cb; QWidget *ui_assets_tab; QVBoxLayout *ui_assets_tab_layout; -- cgit From 3c7f5619dbd2702c4234e085604139569c000eb3 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Thu, 23 Dec 2021 20:45:57 -0600 Subject: Fix emote buttons not generating due to bad VPath lookup --- include/aoemotebutton.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/aoemotebutton.h b/include/aoemotebutton.h index 58e7e74..add9b43 100644 --- a/include/aoemotebutton.h +++ b/include/aoemotebutton.h @@ -14,7 +14,7 @@ public: int p_w, int p_h); void set_image(QString p_image, QString p_emote_comment); - void set_char_image(QString p_char, int p_emote, QString suffix); + void set_char_image(QString p_char, int p_emote, bool on); void set_id(int p_id) { m_id = p_id; } int get_id() { return m_id; } -- cgit From 5ce0e6416e9e821be69219cc8a949c00e2cb462c Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Fri, 24 Dec 2021 21:05:01 +0100 Subject: Fix animation freeze when loading music files (#609) * Implement async music loading * Simplify music filename parsing and fix "missing" on streams Co-authored-by: oldmud0 --- include/aomusicplayer.h | 6 +++++- include/courtroom.h | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/aomusicplayer.h b/include/aomusicplayer.h index f899b9a..7c9bfb3 100644 --- a/include/aomusicplayer.h +++ b/include/aomusicplayer.h @@ -10,6 +10,8 @@ #include #include #include +#include +#include class AOMusicPlayer { public: @@ -24,8 +26,10 @@ public: int loop_start[4] = {0, 0, 0, 0}; int loop_end[4] = {0, 0, 0, 0}; + QFutureWatcher music_watcher; + public slots: - int play(QString p_song, int channel = 0, bool loop = false, + QString play(QString p_song, int channel = 0, bool loop = false, int effect_flags = 0); void stop(int channel = 0); diff --git a/include/courtroom.h b/include/courtroom.h index 4bc8624..9df3b90 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -57,6 +57,8 @@ #include #include +#include + #include #include @@ -814,6 +816,8 @@ public slots: bool steno); void on_reload_theme_clicked(); + void update_ui_music_name(); + private slots: void start_chat_ticking(); void play_sfx(); -- cgit From ecfe6f2542d73e9559b75a502f6eebffe63a76cf Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Sat, 25 Dec 2021 19:17:27 -0600 Subject: Change master chat in courtroom to debug log Since the MS chat has been disabled for quite some time now (and we aren't planning on bringing it back since Discord, Guilded etc. have better chat features), I decided to go ahead and change the pane into a debug log to keep it useful and avoid creating a gaping hole in themes. Though, maybe it is worth removing the whole switcher and keeping the debug log hidden away where it can't scare people. --- include/aoapplication.h | 4 ++++ include/aotextarea.h | 3 ++- include/courtroom.h | 10 +++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 957d7f6..ab73822 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -567,6 +567,10 @@ private slots: public slots: void server_disconnected(); void loading_cancelled(); + +signals: + void qt_log_message(QtMsgType type, const QMessageLogContext &context, + const QString &msg); }; #endif // AOAPPLICATION_H diff --git a/include/aotextarea.h b/include/aotextarea.h index 453e965..d9a960d 100644 --- a/include/aotextarea.h +++ b/include/aotextarea.h @@ -12,7 +12,8 @@ public: AOTextArea(QWidget *p_parent = nullptr); void append_linked(QString p_message); - void append_chatmessage(QString p_name, QString p_message, QString p_colur); + void append_chatmessage(QString p_name, QString p_message, + QString p_name_colour, QString p_color = QString()); void append_error(QString p_message); private: diff --git a/include/courtroom.h b/include/courtroom.h index 4bc8624..4c28606 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -214,8 +214,12 @@ public: void list_music(); void list_areas(); - // these are for OOC chat - void append_ms_chatmessage(QString f_name, QString f_message); + // Debug log (formerly master server chat log) + void debug_message_handler(QtMsgType type, const QMessageLogContext &context, + const QString &msg); + void append_debug_message(QString f_message); + + // OOC chat log void append_server_chatmessage(QString p_name, QString p_message, QString p_color); @@ -628,7 +632,7 @@ private: QTextEdit *ui_ic_chatlog; - AOTextArea *ui_ms_chatlog; + AOTextArea *ui_debug_log; AOTextArea *ui_server_chatlog; QListWidget *ui_mute_list; -- cgit