-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added code to fit window to screen on load - refactored javafx to support window resizing - added stylesheet for javafx - added reconnection overlay - removed check on server IP input - added code to prevent users from having same username
- Loading branch information
Showing
13 changed files
with
317 additions
and
125 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
22 changes: 22 additions & 0 deletions
22
src/main/java/com/wordhunter/client/ui/ReconnectionOverlay.java
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,22 @@ | ||
package com.wordhunter.client.ui; | ||
|
||
import javafx.fxml.FXMLLoader; | ||
import javafx.scene.layout.VBox; | ||
|
||
import java.io.IOException; | ||
|
||
public class ReconnectionOverlay extends VBox | ||
{ | ||
|
||
public ReconnectionOverlay() { | ||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("ReconnectionOverlay.fxml")); | ||
fxmlLoader.setRoot(this); | ||
fxmlLoader.setController(ReconnectionOverlay.this); | ||
|
||
try { | ||
fxmlLoader.load(); | ||
} catch (IOException exception) { | ||
throw new RuntimeException(exception); | ||
} | ||
} | ||
} |
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
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
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 |
---|---|---|
|
@@ -181,4 +181,3 @@ public static void sendMessageToClient(Socket sock, String message) | |
} | ||
} | ||
} | ||
|
23 changes: 23 additions & 0 deletions
23
src/main/resources/com/wordhunter/client/ui/ReconnectionOverlay.fxml
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,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!--overlay when player reconnecting. stops all mouse clicks but doesn't pause any animations--> | ||
|
||
<?import javafx.scene.control.Label?> | ||
<?import javafx.scene.control.ProgressIndicator?> | ||
<?import javafx.scene.layout.VBox?> | ||
<?import javafx.scene.text.Font?> | ||
|
||
<fx:root alignment="CENTER" | ||
style="-fx-background-color: #000000cc;" | ||
type="javafx.scene.layout.VBox" | ||
xmlns="http://javafx.com/javafx" | ||
xmlns:fx="http://javafx.com/fxml/1" | ||
stylesheets="@WordHunterStyleSheet.css"> | ||
<!--spinner--> | ||
<ProgressIndicator prefHeight="46.0" prefWidth="600.0"/> | ||
<!--message--> | ||
<Label alignment="CENTER" blendMode="ADD" text="Reconnecting..." textFill="WHITE"> | ||
<font> | ||
<Font size="26.0"/> | ||
</font> | ||
</Label> | ||
</fx:root> |
Oops, something went wrong.