From 8735e91ff0a4b5db79ad8589626863c921f019a5 Mon Sep 17 00:00:00 2001 From: joelkendall <126310295+joelkendall@users.noreply.github.com> Date: Thu, 22 Aug 2024 09:52:26 +1200 Subject: [PATCH] fixed css styles breaking game over text (#79) --- src/main/resources/css/homescreen.css | 36 ++++++++++++++++++- src/main/resources/fxml/GameBoard.fxml | 46 +++++++++---------------- src/main/resources/fxml/HomeScreen.fxml | 4 +-- 3 files changed, 53 insertions(+), 33 deletions(-) diff --git a/src/main/resources/css/homescreen.css b/src/main/resources/css/homescreen.css index 8fdbb14..66f5f7f 100644 --- a/src/main/resources/css/homescreen.css +++ b/src/main/resources/css/homescreen.css @@ -1,5 +1,6 @@ /* Import the Poppins font from Google Fonts */ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); /* Apply a background color to the AnchorPane */ .anchor-pane { @@ -7,7 +8,7 @@ } /* Style the Text elements */ -.text { +.gen-text { -fx-fill: #333333; /* Dark grey text color */ -fx-font-family: "Poppins", sans-serif; /* Stylish and clean font family */ } @@ -98,3 +99,36 @@ -fx-border-width: 2px; /* Border width */ -fx-shape: "M 0 0 H 30 V 30 H 0 Z"; /* Larger square shape for thumb */ } + +/* GAMEBOARD STYLING */ +#gameOverLabel { + -fx-font-family: "Press Start 2P"; + -fx-font-size: 30px; + -fx-fill: white; + -fx-opacity: 1; + -fx-alignment: center; +} + +#gameOverScoreLabel { + -fx-font-family: "Press Start 2P"; + -fx-font-size: 20px; + -fx-font-weight: Normal; + -fx-fill: #ffffff; +} + +#gameOverHighScoreLabel { + -fx-font-family: "Press Start 2P"; + -fx-font-size: 20px; + -fx-font-weight: Normal; + -fx-fill: #ffffff; +} + +.button#gameOverRestartButton { + -fx-text-fill: Black; + -fx-font-size: 17px; +} + +.button#gameOverExitButton { + -fx-text-fill: Black; + -fx-font-size: 17px; +} diff --git a/src/main/resources/fxml/GameBoard.fxml b/src/main/resources/fxml/GameBoard.fxml index 8403707..7433f70 100644 --- a/src/main/resources/fxml/GameBoard.fxml +++ b/src/main/resources/fxml/GameBoard.fxml @@ -45,7 +45,7 @@ - + @@ -58,24 +58,18 @@ - - - -