hanze/game-client

src/main/java/nl/isygameclient/controllers/games/othello/OthelloMainMenuController.java in main
Repositories | Summary | Log | Files

OthelloMainMenuController.java (950B) download


 1package nl.isygameclient.controllers.games.othello;
 2
 3import javafx.event.ActionEvent;
 4import javafx.fxml.FXML;
 5import nl.isygameclient.Window;
 6import nl.isygameclient.controllers.games.GameController;
 7import nl.isygameclient.controllers.games.GameMenuController;
 8import nl.isygameclient.util.StageHandler;
 9
10public class OthelloMainMenuController implements GameMenuController {
11	@Override
12	public void onSinglePlayerButtonClick(ActionEvent e) {
13		StageHandler.get().changeSceneOfStage(Window.GAME, "/nl/isygameclient/views/games/othello/OthelloSinglePlayer.fxml");
14	}
15
16	@Override
17	public void onMultiPlayerButtonClick(ActionEvent e) {
18		StageHandler.get().changeSceneOfStage(Window.GAME,"/nl/isygameclient/views/games/othello/OthelloMultiPlayer.fxml");
19	}
20
21	@Override
22	public void onExitGameButtonClick(ActionEvent e) {
23		var stageHandler = StageHandler.get();
24		stageHandler.getStage(Window.GAME).hide();
25		stageHandler.focusStage(Window.APP);
26	}
27}