diff --git a/errorlog.txt b/errorlog.txt new file mode 100644 index 0000000..e69de29 diff --git a/history.txt b/history.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/wrestlingtournamentcli/DarkThemeChanges.css b/src/wrestlingtournamentcli/DarkThemeChanges.css new file mode 100644 index 0000000..dd2bf5d --- /dev/null +++ b/src/wrestlingtournamentcli/DarkThemeChanges.css @@ -0,0 +1,8 @@ +.root { + -fx-base: #3f474f; + -fx-accent: #e7eff7 ; + -fx-default-button: #7f878f ; + -fx-focus-color: #efefef; + -fx-focused-text-base-color : ladder(-fx-selection-bar, -fx-light-text-color 40%, -fx-dark-text-color 40%, -fx-dark-text-color 60%, + -fx-mid-text-color 60%); +} \ No newline at end of file diff --git a/src/wrestlingtournamentcli/Main.java b/src/wrestlingtournamentcli/Main.java index 53e5234..b703667 100644 --- a/src/wrestlingtournamentcli/Main.java +++ b/src/wrestlingtournamentcli/Main.java @@ -25,6 +25,7 @@ import javafx.stage.FileChooser; import javafx.stage.Stage; import javafx.scene.control.Tooltip; +import javafx.scene.control.ToggleButton; /** * @author Jared Murphy * @author Cody Francis @@ -496,6 +497,7 @@ public void start(Stage stage) throws Exception { GridPane introLayout = new GridPane(); Button wrestling = new Button(); Button soccer = new Button(); + ToggleButton theme = new ToggleButton(); Label introMenu = new Label("Please select the sport you would like to manage:"); //UI elements for selection Screen BorderPane soccerRoot = new BorderPane(); @@ -538,10 +540,13 @@ public void start(Stage stage) throws Exception { wrestling.setPadding(new Insets(10,10,10,10)); soccer.setText("Soccer"); soccer.setPadding(new Insets(10,10,10,10)); + theme.setText("Theme"); + theme.setPadding(new Insets(10,10,10,10)); introLayout.setPadding(new Insets(300,100,100,100)); introLayout.add(introMenu, 0, 0); introLayout.add(wrestling, 2,3 ); introLayout.add(soccer, 3, 3); + introLayout.add(theme, 2, 4); introRoot.setCenter(introLayout); //Initializing introduction UI elements importTeams.setMinWidth(110); @@ -598,7 +603,7 @@ public void start(Stage stage) throws Exception { layout.add(Weight, 1, 10); layout.add(TotalWins, 1,11); layout.add(TotalMatch, 1, 12); - layout.add(start, 0, 6); + //layout.add(start, 0, 6); layout.add(compareWrestlers, 0, 7); layout.add( compareWrestlersTxt, 1, 7); @@ -618,6 +623,13 @@ public void start(Stage stage) throws Exception { Model soccerModel = new Model("soccer"); stage.setScene(soccerScene); }); + theme.setOnAction(e ->{ + if(theme.isSelected()) { + root.getStylesheets().add(getClass().getResource("DarkThemeChanges.css").toExternalForm()); + } else { + root.getStylesheets().remove(getClass().getResource("DarkThemeChanges.css").toExternalForm()); + } + }); viewTeams.setOnAction(e -> { ArrayList show = Model.printTeams(); for(int i = 0; i < show.size(); i++) {