Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added errorlog.txt
Empty file.
Empty file added history.txt
Empty file.
8 changes: 8 additions & 0 deletions src/wrestlingtournamentcli/DarkThemeChanges.css
Original file line number Diff line number Diff line change
@@ -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%);
}
14 changes: 13 additions & 1 deletion src/wrestlingtournamentcli/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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<Team> show = Model.printTeams();
for(int i = 0; i < show.size(); i++) {
Expand Down