新增 MESSAGEBOX_ENABLE 宏用于控制棋局结束是否弹框提示

This commit is contained in:
CalciteM 2019-07-29 22:58:40 +08:00
parent ef77a5d061
commit 476dc231b0
3 changed files with 6 additions and 2 deletions

View File

@ -39,6 +39,8 @@
#define MOVE_PRIORITY_TABLE_SUPPORT
//#define MESSAGEBOX_ENABLE
#ifdef DEBUG_MODE
#define DONOT_PLAY_SOUND
#define DEBUG_AB_TREE

View File

@ -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
}
}

View File

@ -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
}