Update controls

This commit is contained in:
Anthony Calosa
2020-04-26 18:37:10 +08:00
parent a553103e39
commit e7cbee211d
2 changed files with 5 additions and 1 deletions

View File

@@ -54,6 +54,8 @@ public class ControlWinLose {
view.getBtnQuit().setEnabled(false); view.getBtnQuit().setEnabled(false);
} }
}); });
if(humancount == 0)
view.getBtnRestart().setEnabled(false);
} }
/** Action performed when "continue" button is pressed in default win/lose UI. */ /** Action performed when "continue" button is pressed in default win/lose UI. */

View File

@@ -305,7 +305,9 @@ public class HostedMatch {
humanController.getGui().clearAutoYields(); humanController.getGui().clearAutoYields();
} }
if (!GuiBase.getInterface().isLibgdxPort()||!isMatchOver) if (humanCount > 0) //conceded
humanController.getGui().afterGameEnd();
else if (!GuiBase.getInterface().isLibgdxPort()||!isMatchOver)
humanController.getGui().afterGameEnd(); humanController.getGui().afterGameEnd();
} }
humanControllers.clear(); humanControllers.clear();