File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
src/main/kotlin/sc/gui/view Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,12 @@ class AppView : View("Software-Challenge Germany") {
2828 logger.debug(" Quitting!" )
2929 Platform .exit()
3030 }
31- item(" Neues Spiel" , " Shortcut+N" ).action {
31+ item(" Neues Spiel" , " Shortcut+N" ) {
3232 enableWhen(controller.model.currentView.isNotEqualTo(ViewType .GAME_CREATION ))
33- logger.debug(" New Game!" )
34- if (controller.model.currentView.get() == ViewType .GAME ) {
35- alert(
33+ action {
34+ logger.debug(" New Game!" )
35+ if (controller.model.currentView.get() == ViewType .GAME ) {
36+ alert(
3637 type = Alert .AlertType .CONFIRMATION ,
3738 header = " Neues Spiel anfangen" ,
3839 content = " Willst du wirklich dein aktuelles Spiel verwerfen und ein neues anfangen?" ,
@@ -42,9 +43,10 @@ class AppView : View("Software-Challenge Germany") {
4243 gameController.clearGame()
4344 }
4445 }
45- )
46- } else if (controller.model.currentView.get() != ViewType .GAME_CREATION ) {
47- controller.changeViewTo(ViewType .GAME_CREATION )
46+ )
47+ } else if (controller.model.currentView.get() != ViewType .GAME_CREATION ) {
48+ controller.changeViewTo(ViewType .GAME_CREATION )
49+ }
4850 }
4951 }
5052 item(" Toggle Darkmode" ).action {
You can’t perform that action at this time.
0 commit comments