Reject running games without any rooms
This commit is contained in:
1 parent
30faa2d063
commit
543196d99e
1 file changed
+7
@@ -820,6 +820,13 @@ void MainWindow::showIncludedFiles()
|
||||
|
||||
void MainWindow::runGame()
|
||||
{
|
||||
if (m_project.rooms.empty())
|
||||
{
|
||||
QMessageBox::information(this, tr("No room to play"),
|
||||
tr("Create a room before running the game."));
|
||||
return;
|
||||
}
|
||||
|
||||
GameEngine engine{m_project};
|
||||
|
||||
setEnabled(false);
|
||||
|
||||
Reference in new issue
Block a user