diff --git a/src/charselect.cpp b/src/charselect.cpp index f8c622d..1091a7a 100644 --- a/src/charselect.cpp +++ b/src/charselect.cpp @@ -133,7 +133,7 @@ void Courtroom::char_clicked(int n_char) qDebug() << "char_ini_path" << char_ini_path; if (!file_exists(char_ini_path)) { - call_notice("Could not find " + char_ini_path); + call_error("Could not find " + char_ini_path); return; } } diff --git a/src/debug_functions.cpp b/src/debug_functions.cpp index b832164..477eec7 100644 --- a/src/debug_functions.cpp +++ b/src/debug_functions.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include "debug_functions.h" @@ -24,6 +26,10 @@ void call_notice(QString p_message) msgBox->setWindowTitle( QCoreApplication::translate("debug_functions", "Notice")); - // msgBox->setWindowModality(Qt::NonModal); - msgBox->exec(); + msgBox->setStandardButtons(QMessageBox::NoButton); + + QTimer::singleShot(3000, msgBox, std::bind(&QMessageBox::setStandardButtons,msgBox,QMessageBox::Ok)); + + msgBox->exec(); + } diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp index 0b73cdf..4e2d5ed 100644 --- a/src/packet_distribution.cpp +++ b/src/packet_distribution.cpp @@ -535,6 +535,11 @@ void AOApplication::server_packet_received(AOPacket *p_packet) if (courtroom_constructed && f_contents.size() > 0) w_courtroom->set_mute(false, f_contents.at(0).toInt()); } + else if (header == "BB") { + if (courtroom_constructed && f_contents.size() >= 1) { + call_notice(f_contents.at(0)); + } + } else if (header == "KK") { if (courtroom_constructed && f_contents.size() >= 1) { call_notice(tr("You have been kicked from the server.\nReason: %1")