mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
close buttons for tabs
This commit is contained in:
parent
9933b219a9
commit
0ea8375a2f
9 changed files with 116 additions and 10 deletions
|
|
@ -310,6 +310,11 @@ void TabGame::retranslateUi()
|
|||
scene->retranslateUi();
|
||||
}
|
||||
|
||||
void TabGame::closeRequest()
|
||||
{
|
||||
actLeaveGame();
|
||||
}
|
||||
|
||||
void TabGame::actConcede()
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Concede"), tr("Are you sure you want to concede this game?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) != QMessageBox::Yes)
|
||||
|
|
@ -320,8 +325,9 @@ void TabGame::actConcede()
|
|||
|
||||
void TabGame::actLeaveGame()
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Leave game"), tr("Are you sure you want to leave this game?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) != QMessageBox::Yes)
|
||||
return;
|
||||
if (!spectator)
|
||||
if (QMessageBox::question(this, tr("Leave game"), tr("Are you sure you want to leave this game?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
sendGameCommand(new Command_LeaveGame);
|
||||
deleteLater();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue