Skip to content
Snippets Groups Projects
Commit f78bcab1 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Fix fade settings loading, rename fade settings view controller

parent 4bcd5a30
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ import de.tobias.playpad.pad.PadSettings; ...@@ -7,7 +7,7 @@ import de.tobias.playpad.pad.PadSettings;
import de.tobias.playpad.settings.FadeSettings; import de.tobias.playpad.settings.FadeSettings;
import de.tobias.playpad.view.PseudoClasses; import de.tobias.playpad.view.PseudoClasses;
import de.tobias.playpad.viewcontroller.PadSettingsTabViewController; import de.tobias.playpad.viewcontroller.PadSettingsTabViewController;
import de.tobias.playpad.viewcontroller.settings.FadeViewController; import de.tobias.playpad.viewcontroller.settings.FadeSettingsViewController;
import de.tobias.playpad.viewcontroller.settings.WarningFeedbackViewController; import de.tobias.playpad.viewcontroller.settings.WarningFeedbackViewController;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.CheckBox; import javafx.scene.control.CheckBox;
...@@ -21,7 +21,7 @@ public class PlayerPadTabViewController extends PadSettingsTabViewController { ...@@ -21,7 +21,7 @@ public class PlayerPadTabViewController extends PadSettingsTabViewController {
private CheckBox customFadeCheckBox; private CheckBox customFadeCheckBox;
@FXML @FXML
private VBox fadeContainer; private VBox fadeContainer;
private FadeViewController fadeViewController; private FadeSettingsViewController fadeViewController;
@FXML @FXML
private VBox warningFeedbackContainer; private VBox warningFeedbackContainer;
...@@ -42,7 +42,7 @@ public class PlayerPadTabViewController extends PadSettingsTabViewController { ...@@ -42,7 +42,7 @@ public class PlayerPadTabViewController extends PadSettingsTabViewController {
@Override @Override
public void init() { public void init() {
// Embed ViewController // Embed ViewController
fadeViewController = new FadeViewController(); fadeViewController = new FadeSettingsViewController();
fadeContainer.getChildren().add(fadeViewController.getParent()); fadeContainer.getChildren().add(fadeViewController.getParent());
warningFeedbackViewController = WarningFeedbackViewController.newViewControllerForPad(); warningFeedbackViewController = WarningFeedbackViewController.newViewControllerForPad();
......
...@@ -7,7 +7,7 @@ import de.tobias.playpad.profile.Profile; ...@@ -7,7 +7,7 @@ import de.tobias.playpad.profile.Profile;
import de.tobias.playpad.profile.ProfileSettings; import de.tobias.playpad.profile.ProfileSettings;
import de.tobias.playpad.viewcontroller.cell.EnumCell; import de.tobias.playpad.viewcontroller.cell.EnumCell;
import de.tobias.playpad.viewcontroller.option.ProfileSettingsTabViewController; import de.tobias.playpad.viewcontroller.option.ProfileSettingsTabViewController;
import de.tobias.playpad.viewcontroller.settings.FadeViewController; import de.tobias.playpad.viewcontroller.settings.FadeSettingsViewController;
import de.tobias.playpad.viewcontroller.settings.WarningFeedbackViewController; import de.tobias.playpad.viewcontroller.settings.WarningFeedbackViewController;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.CheckBox; import javafx.scene.control.CheckBox;
...@@ -32,7 +32,7 @@ public class PlayerTabViewController extends ProfileSettingsTabViewController { ...@@ -32,7 +32,7 @@ public class PlayerTabViewController extends ProfileSettingsTabViewController {
load("view/option/profile", "PlayerTab", Localization.getBundle()); load("view/option/profile", "PlayerTab", Localization.getBundle());
// Player // Player
FadeViewController fadeViewController = new FadeViewController(); FadeSettingsViewController fadeViewController = new FadeSettingsViewController();
fadeViewController.setFadeSettings(Profile.currentProfile().getProfileSettings().getFade()); fadeViewController.setFadeSettings(Profile.currentProfile().getProfileSettings().getFade());
fadeContainer.getChildren().add(fadeViewController.getParent()); fadeContainer.getChildren().add(fadeViewController.getParent());
setAnchor(fadeViewController.getParent(), 0, 0, 0, 0); setAnchor(fadeViewController.getParent(), 0, 0, 0, 0);
......
...@@ -10,7 +10,7 @@ import javafx.scene.control.Label; ...@@ -10,7 +10,7 @@ import javafx.scene.control.Label;
import javafx.scene.control.Slider; import javafx.scene.control.Slider;
import javafx.util.Duration; import javafx.util.Duration;
public class FadeViewController extends NVC { public class FadeSettingsViewController extends NVC {
@FXML @FXML
private Slider fadeInSlider; private Slider fadeInSlider;
...@@ -34,7 +34,7 @@ public class FadeViewController extends NVC { ...@@ -34,7 +34,7 @@ public class FadeViewController extends NVC {
private FadeSettings fade; private FadeSettings fade;
public FadeViewController() { public FadeSettingsViewController() {
load("view/settings", "FadeView", Localization.getBundle()); load("view/settings", "FadeView", Localization.getBundle());
} }
......
...@@ -148,9 +148,9 @@ public class FadeSettings { ...@@ -148,9 +148,9 @@ public class FadeSettings {
FadeSettings fade = new FadeSettings(); FadeSettings fade = new FadeSettings();
Element fadeInElement = container.element(FADE_IN); Element fadeInElement = container.element(FADE_IN);
if (fadeInElement.attributeValue(ON_PAUSE_ATTR) != null) if (fadeInElement.attributeValue(ON_START_ATTR) != null)
fade.setFadeInStart(Boolean.parseBoolean(fadeInElement.attributeValue(ON_START_ATTR))); fade.setFadeInStart(Boolean.parseBoolean(fadeInElement.attributeValue(ON_START_ATTR)));
if (fadeInElement.attributeValue(ON_STOP_ATTR) != null) if (fadeInElement.attributeValue(ON_PAUSE_ATTR) != null)
fade.setFadeInPause(Boolean.parseBoolean(fadeInElement.attributeValue(ON_PAUSE_ATTR))); fade.setFadeInPause(Boolean.parseBoolean(fadeInElement.attributeValue(ON_PAUSE_ATTR)));
fade.setFadeIn(Duration.valueOf(fadeInElement.getStringValue().replace(" ", ""))); fade.setFadeIn(Duration.valueOf(fadeInElement.getStringValue().replace(" ", "")));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment