新增 MESSAGEBOX_ENABLE 宏用于控制棋局结束是否弹框提示
This commit is contained in:
parent
ef77a5d061
commit
476dc231b0
|
@ -39,6 +39,8 @@
|
|||
|
||||
#define MOVE_PRIORITY_TABLE_SUPPORT
|
||||
|
||||
//#define MESSAGEBOX_ENABLE
|
||||
|
||||
#ifdef DEBUG_MODE
|
||||
#define DONOT_PLAY_SOUND
|
||||
#define DEBUG_AB_TREE
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue