src/authoring/gamestate/GameChooser.java
@Override
	public void showAndWait(Consumer<String> onClose) {
		Scene scene = new Scene(root, PANE_SIZE, PANE_SIZE);
		scene.getStylesheets().add(MainApplication.class.getResource("styles.css").toExternalForm());
		root.getStyleClass().add(BACKGROUND_CSS);
		Stage stage = new Stage();
		stage.setScene(scene);
		stage.show();
		gamesView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {
			@Override
			public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
				DataUtils.setGame(newValue);
				onClose.accept(newValue);
				stage.close();
			}
		});
	}
/**
	 * Defines what to do when the window is popped up, and what to do when it is closed.
	 * @param onClose the consumer to define what to do when the window is closed
	 */
Defines what to do when the window is popped up, and what to do when it is closed.
@param onClose the consumer to define what to do when the window is closed
Defines what to do when the window is popped up and what to do when it is closed . @param onClose the consumer to define what to do when the window is closed
@Override
	public void showAndWait(Consumer<String> onClose) {
		Scene scene = new Scene(root, PANE_SIZE, PANE_SIZE);
		scene.getStylesheets().add(MainApplication.class.getResource("styles.css").toExternalForm());
		root.getStyleClass().add(BACKGROUND_CSS);
		Stage stage = new Stage();
		stage.setScene(scene);
		stage.show();
		gamesView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {
			@Override
			public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
				DataUtils.setGame(newValue);
				onClose.accept(newValue);
				stage.close();
			}
		});
	}
@ Override public void showAndWait ( Consumer < String > onClose ) { Scene scene = new Scene ( root , PANE_SIZE , PANE_SIZE ) ; scene . getStylesheets ( ) . add ( MainApplication . class . getResource ( "styles.css" ) . toExternalForm ( ) ) ; root . getStyleClass ( ) . add ( BACKGROUND_CSS ) ; Stage stage = new Stage ( ) ; stage . setScene ( scene ) ; stage . show ( ) ; gamesView . getSelectionModel ( ) . selectedItemProperty ( ) . addListener ( new ChangeListener < String > ( ) { @ Override public void changed ( ObservableValue < ? extends String > observable , String oldValue , String newValue ) { DataUtils . setGame ( newValue ) ; onClose . accept ( newValue ) ; stage . close ( ) ; } } ) ; }
Defines what to do when the window is popped up, and what to do when it is closed.
Defines what to do when the window is popped up and what to do when it is closed .