added modcall reason
This commit is contained in:
parent
68a3f35fb0
commit
de6d325334
@ -2018,9 +2018,25 @@ void Courtroom::on_spectator_clicked()
|
||||
|
||||
void Courtroom::on_call_mod_clicked()
|
||||
{
|
||||
ao_app->send_server_packet(new AOPacket("ZZ#%"));
|
||||
auto box = new QInputDialog();
|
||||
box->setLabelText("Enter a reason:");
|
||||
auto code = box->exec();
|
||||
|
||||
if (code != QDialog::Accepted)
|
||||
return;
|
||||
|
||||
auto text = box->textValue();
|
||||
if (text.isEmpty())
|
||||
text = "N/A";
|
||||
|
||||
QStringList mod_reason;
|
||||
mod_reason.append(text);
|
||||
|
||||
ao_app->send_server_packet(new AOPacket("ZZ", mod_reason));
|
||||
|
||||
ui_ic_chat_message->setFocus();
|
||||
|
||||
delete box;
|
||||
}
|
||||
|
||||
void Courtroom::on_pre_clicked()
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <QSignalMapper>
|
||||
#include <QMap>
|
||||
#include <QTextBrowser>
|
||||
#include <QInputDialog>
|
||||
|
||||
class AOApplication;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user