From 476dc231b0fefa4341fcc88f3c8eb7c8bb19f48a Mon Sep 17 00:00:00 2001 From: CalciteM Date: Mon, 29 Jul 2019 22:58:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20MESSAGEBOX=5FENABLE=20?= =?UTF-8?q?=E5=AE=8F=E7=94=A8=E4=BA=8E=E6=8E=A7=E5=88=B6=E6=A3=8B=E5=B1=80?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=98=AF=E5=90=A6=E5=BC=B9=E6=A1=86=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NineChess/src/config.h | 2 ++ NineChess/src/gamecontroller.cpp | 2 ++ NineChess/src/server.cpp | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NineChess/src/config.h b/NineChess/src/config.h index c3afbc7f..ae1e8eb7 100644 --- a/NineChess/src/config.h +++ b/NineChess/src/config.h @@ -39,6 +39,8 @@ #define MOVE_PRIORITY_TABLE_SUPPORT +//#define MESSAGEBOX_ENABLE + #ifdef DEBUG_MODE #define DONOT_PLAY_SOUND #define DEBUG_AB_TREE diff --git a/NineChess/src/gamecontroller.cpp b/NineChess/src/gamecontroller.cpp index caa1e66e..e82ef3b7 100644 --- a/NineChess/src/gamecontroller.cpp +++ b/NineChess/src/gamecontroller.cpp @@ -896,9 +896,11 @@ bool GameController::command(const QString &cmd, bool update /* = true */) ai1.stop(); ai2.stop(); +#ifdef MESSAGEBOX_ENABLE // 弹框 message = QString::fromStdString(chess_.getTips()); QMessageBox::about(NULL, "游戏结果", message); +#endif } } diff --git a/NineChess/src/server.cpp b/NineChess/src/server.cpp index 02a1f9d5..327e2de3 100644 --- a/NineChess/src/server.cpp +++ b/NineChess/src/server.cpp @@ -119,13 +119,13 @@ void Server::sessionOpened() close(); return; } else { -#ifdef DEBUG_MODE +#ifdef MESSAGEBOX_ENABLE QMessageBox::information(this, tr("Server"), tr("server Started %1.").arg(port)); #endif } } else { -#ifdef DEBUG_MODE +#ifdef MESSAGEBOX_ENABLE QMessageBox::information(this, tr("Server"), tr("server Started %1.").arg(port)); #endif }