-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: dashluu <dashluu@users.noreply.github.com> Co-authored-by: Samantha Prestrelski <sprestrelski@users.noreply.github.com>
1 parent
f2e29ca
commit 5713cee
Showing
4 changed files
with
116 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package code.client.View; | ||
|
||
import javafx.scene.control.*; | ||
import javafx.scene.image.Image; | ||
import javafx.scene.image.ImageView; | ||
import javafx.scene.layout.*; | ||
import javafx.scene.text.Font; | ||
import javafx.geometry.Insets; | ||
import java.io.File; | ||
|
||
import code.client.Model.AppConfig; | ||
|
||
public class LoadingUI extends HBox { | ||
private final Label loadingLabel; | ||
private final ImageView loadingImg; | ||
|
||
LoadingUI() { | ||
GridPane gridPane = new GridPane(); | ||
gridPane.setPrefSize(620, 620); | ||
gridPane.setAlignment(javafx.geometry.Pos.CENTER); | ||
gridPane.setHgap(10); | ||
gridPane.setVgap(10); | ||
gridPane.setPadding(new Insets(25, 25, 25, 25)); | ||
gridPane.setStyle("-fx-background-color: #F0F8FF;"); | ||
loadingLabel = new Label("Loading..."); | ||
loadingLabel.setFont(Font.font("Comic Sans MS", 20)); // Adjust the size as needed | ||
gridPane.add(loadingLabel, 1, 1); | ||
// Show an image when the server is offline | ||
File file = new File(AppConfig.LOADING_IMG_FILE); | ||
loadingImg = new ImageView(new Image(file.toURI().toString())); | ||
loadingImg.setFitWidth(Region.USE_COMPUTED_SIZE); | ||
gridPane.add(loadingImg, 1, 2); | ||
getChildren().addAll(gridPane); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.