Search in sources :

Example 1 with SettingsController

use of com.faforever.client.preferences.ui.SettingsController in project downlords-faf-client by FAForever.

the class MainController method onSettingsSelected.

public void onSettingsSelected() {
    Stage stage = new Stage(StageStyle.UNDECORATED);
    stage.initOwner(mainRoot.getScene().getWindow());
    SettingsController settingsController = uiService.loadFxml("theme/settings/settings.fxml");
    WindowController windowController = uiService.loadFxml("theme/window.fxml");
    windowController.configure(stage, settingsController.getRoot(), true, CLOSE);
    windowController.setOnHiding(event -> preferencesService.storeInBackground());
    stage.setTitle(i18n.get("settings.windowTitle"));
    stage.show();
}
Also used : Stage(javafx.stage.Stage) WindowController(com.faforever.client.fx.WindowController) SettingsController(com.faforever.client.preferences.ui.SettingsController)

Aggregations

WindowController (com.faforever.client.fx.WindowController)1 SettingsController (com.faforever.client.preferences.ui.SettingsController)1 Stage (javafx.stage.Stage)1