Add resources
BIN
src/main/resources/ECS.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
src/main/resources/ECSChat.png
Normal file
|
After Width: | Height: | Size: 121 KiB |
BIN
src/main/resources/angle_left_icon.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/angle_right_icon.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/main/resources/background.jpg
Normal file
|
After Width: | Height: | Size: 255 KiB |
@@ -6,11 +6,8 @@
|
||||
<?import javafx.scene.Cursor?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.CheckBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.control.Separator?>
|
||||
<?import javafx.scene.control.SplitPane?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
@@ -24,7 +21,6 @@
|
||||
<children>
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" styleClass="active" text="Chat" />
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" text="Game" />
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" text="Whiteboard" />
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false">
|
||||
<graphic>
|
||||
<CheckBox fx:id="audioEnabled" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" selected="true" text="Sound" />
|
||||
@@ -39,7 +35,7 @@
|
||||
<String fx:value="left-menu" />
|
||||
</styleClass>
|
||||
</VBox>
|
||||
<StackPane fx:id="chatContainerStackPane" prefHeight="150.0" prefWidth="200.0">
|
||||
<StackPane fx:id="mainStackPane" prefHeight="150.0" prefWidth="200.0">
|
||||
<children>
|
||||
<VBox maxHeight="1.7976931348623157E308" spacing="4.0" styleClass="chat-container">
|
||||
<children>
|
||||
@@ -68,33 +64,6 @@
|
||||
</children>
|
||||
</HBox>
|
||||
<Separator prefWidth="200.0" />
|
||||
<ScrollPane fx:id="messagesContainer" fitToWidth="true" focusTraversable="false" hbarPolicy="NEVER" maxHeight="1.7976931348623157E308" styleClass="messages-container" vvalue="1.0" VBox.vgrow="ALWAYS">
|
||||
<content>
|
||||
<VBox fx:id="messages" maxWidth="1.7976931348623157E308" styleClass="messages">
|
||||
<children>
|
||||
<Label fx:id="noMessagesYetText" text="No messages yet." wrapText="true" />
|
||||
</children>
|
||||
</VBox>
|
||||
</content>
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
</ScrollPane>
|
||||
<HBox alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" spacing="4.0">
|
||||
<children>
|
||||
<TextField fx:id="messageToSend" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" onKeyPressed="#handleMessageToSendKeypress" promptText="Type a message..." HBox.hgrow="ALWAYS">
|
||||
<styleClass>
|
||||
<String fx:value="message-input" />
|
||||
<String fx:value="text-field-no-outline" />
|
||||
</styleClass>
|
||||
</TextField>
|
||||
<Button mnemonicParsing="false" styleClass="button-primary" text="Send" />
|
||||
</children>
|
||||
<styleClass>
|
||||
<String fx:value="send-message-container" />
|
||||
<String fx:value="outline-section" />
|
||||
</styleClass>
|
||||
</HBox>
|
||||
</children>
|
||||
</VBox>
|
||||
<ImageView fx:id="showRightPanel" fitHeight="24.0" fitWidth="24.0" onMouseClicked="#toggleRightPanel" pickOnBounds="true" preserveRatio="true" StackPane.alignment="CENTER_RIGHT">
|
||||
@@ -131,66 +100,7 @@
|
||||
</ImageView>
|
||||
</children>
|
||||
</StackPane>
|
||||
<VBox fx:id="rightPanel" prefHeight="200.0" prefWidth="100.0" spacing="4.0">
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h3" text="Connected Users" />
|
||||
<HBox alignment="CENTER_LEFT" spacing="4.0" styleClass="outline-section">
|
||||
<children>
|
||||
<TextField fx:id="usersSearchField" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" promptText="Search" styleClass="text-field-no-outline" HBox.hgrow="ALWAYS" />
|
||||
<ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@search_icon.png" />
|
||||
</image>
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</ImageView>
|
||||
</children>
|
||||
</HBox>
|
||||
<VBox>
|
||||
<children>
|
||||
<VBox fx:id="myUsernameContainer" styleClass="outline-section">
|
||||
<children>
|
||||
<HBox fx:id="myUsernameTextContainer" alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" onMouseClicked="#showMyUsernameInput" spacing="4.0">
|
||||
<children>
|
||||
<VBox alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" styleClass="my-nickname-container" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<Text fx:id="myUsernameText" strokeType="OUTSIDE" strokeWidth="0.0" text="Guest" />
|
||||
</children>
|
||||
</VBox>
|
||||
<ImageView id="editMyNickname" fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@pen_icon.png" />
|
||||
</image>
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</ImageView>
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox id="editMyNickname" fx:id="myUsernameInputContainer" alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" spacing="4.0">
|
||||
<children>
|
||||
<TextField fx:id="myUsernameInput" maxHeight="1.7976931348623157E308" onKeyPressed="#handleUsernameKeypress" text="Guest" HBox.hgrow="ALWAYS">
|
||||
<styleClass>
|
||||
<String fx:value="edit-nickname-input" />
|
||||
<String fx:value="text-field-no-outline" />
|
||||
</styleClass>
|
||||
</TextField>
|
||||
<ImageView id="saveMyNickname" fitHeight="16.0" fitWidth="16.0" onMouseClicked="#hideMyUsernameInput" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@check_icon.png" />
|
||||
</image>
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</ImageView>
|
||||
</children>
|
||||
</HBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
<VBox fx:id="rightPanel" prefHeight="200.0" prefWidth="100.0" spacing="8.0">
|
||||
<styleClass>
|
||||
<String fx:value="menu" />
|
||||
<String fx:value="right-menu" />
|
||||
|
||||
25
src/main/resources/chat.css
Normal file
@@ -0,0 +1,25 @@
|
||||
.messages {
|
||||
-fx-line-spacing: 2px;
|
||||
-fx-padding: 8px;
|
||||
}
|
||||
.messages > .message-container > .timestamp {
|
||||
-fx-font-style: italic;
|
||||
-fx-fill: #495961;
|
||||
}
|
||||
.messages > .message-container > .username {
|
||||
-fx-font-weight: bold;
|
||||
}
|
||||
.chat-container {
|
||||
-fx-border-radius: 32px;
|
||||
-fx-border-color: #E1E8EC;
|
||||
-fx-border-width: 1px;
|
||||
-fx-background-radius: 32px;
|
||||
-fx-padding: 16px;
|
||||
}
|
||||
.my-nickname-container, .edit-nickname-input {
|
||||
-fx-padding: 0;
|
||||
-fx-border-width: 0;
|
||||
}
|
||||
.my-nickname-container > Text, .edit-nickname-input {
|
||||
-fx-font-size: 1.2em;
|
||||
}
|
||||
203
src/main/resources/chat.fxml
Normal file
@@ -0,0 +1,203 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import java.lang.String?>
|
||||
<?import java.net.URL?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.Cursor?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.CheckBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.control.Separator?>
|
||||
<?import javafx.scene.control.SplitPane?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.StackPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<SplitPane fx:id="mainSplitPane" dividerPositions="0.14, 0.75" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="500.0" minWidth="800.0" prefHeight="628.0" prefWidth="1105.0" styleClass=".root" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<items>
|
||||
<VBox fx:id="leftPanel" alignment="TOP_RIGHT" spacing="4.0">
|
||||
<children>
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" styleClass="active" text="Chat" />
|
||||
<Button fx:id="openGame" alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" text="Game" />
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false">
|
||||
<graphic>
|
||||
<CheckBox fx:id="audioEnabled" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" selected="true" text="Sound" />
|
||||
</graphic>
|
||||
<VBox.margin>
|
||||
<Insets top="12.0" />
|
||||
</VBox.margin>
|
||||
</Button>
|
||||
</children>
|
||||
<styleClass>
|
||||
<String fx:value="menu" />
|
||||
<String fx:value="left-menu" />
|
||||
</styleClass>
|
||||
</VBox>
|
||||
<StackPane fx:id="mainStackPane" prefHeight="150.0" prefWidth="200.0">
|
||||
<children>
|
||||
<VBox maxHeight="1.7976931348623157E308" spacing="4.0" styleClass="chat-container">
|
||||
<children>
|
||||
<HBox prefHeight="28.0" styleClass="header">
|
||||
<children>
|
||||
<ImageView fitHeight="42.0" fitWidth="42.0" pickOnBounds="true" preserveRatio="true" styleClass="logo">
|
||||
<image>
|
||||
<Image url="@uos_logo.png" />
|
||||
</image>
|
||||
<HBox.margin>
|
||||
<Insets bottom="8.0" left="12.0" right="12.0" top="8.0" />
|
||||
</HBox.margin>
|
||||
</ImageView>
|
||||
<VBox alignment="CENTER_LEFT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h2" text="ECS Chat" />
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="The ultimate chatroom." />
|
||||
</children>
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
<HBox.margin>
|
||||
<Insets bottom="4.0" />
|
||||
</HBox.margin>
|
||||
</VBox>
|
||||
</children>
|
||||
</HBox>
|
||||
<Separator prefWidth="200.0" />
|
||||
<ScrollPane fx:id="messagesContainer" fitToWidth="true" focusTraversable="false" hbarPolicy="NEVER" maxHeight="1.7976931348623157E308" styleClass="messages-container" vvalue="1.0" VBox.vgrow="ALWAYS">
|
||||
<content>
|
||||
<VBox fx:id="messages" maxWidth="1.7976931348623157E308" styleClass="messages">
|
||||
<children>
|
||||
<Label fx:id="noMessagesYetText" text="No messages yet." wrapText="true" />
|
||||
</children>
|
||||
</VBox>
|
||||
</content>
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
</ScrollPane>
|
||||
<HBox alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" spacing="4.0">
|
||||
<children>
|
||||
<TextField fx:id="messageToSend" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" onKeyPressed="#handleMessageToSendKeypress" promptText="Type a message..." HBox.hgrow="ALWAYS">
|
||||
<styleClass>
|
||||
<String fx:value="message-input" />
|
||||
<String fx:value="text-field-no-outline" />
|
||||
</styleClass>
|
||||
</TextField>
|
||||
<Button mnemonicParsing="false" styleClass="button-primary" text="Send" />
|
||||
</children>
|
||||
<styleClass>
|
||||
<String fx:value="send-message-container" />
|
||||
<String fx:value="outline-section" />
|
||||
</styleClass>
|
||||
</HBox>
|
||||
</children>
|
||||
</VBox>
|
||||
<ImageView fx:id="showRightPanel" fitHeight="24.0" fitWidth="24.0" onMouseClicked="#toggleRightPanel" pickOnBounds="true" preserveRatio="true" StackPane.alignment="CENTER_RIGHT">
|
||||
<image>
|
||||
<Image url="@angle_left_icon.png" />
|
||||
</image>
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</ImageView>
|
||||
<ImageView fx:id="showLeftPanel" fitHeight="24.0" fitWidth="24.0" onMouseClicked="#toggleLeftPanel" pickOnBounds="true" preserveRatio="true" StackPane.alignment="CENTER_LEFT">
|
||||
<image>
|
||||
<Image url="@angle_right_icon.png" />
|
||||
</image>
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</ImageView>
|
||||
<ImageView fx:id="hideLeftPanel" fitHeight="24.0" fitWidth="24.0" onMouseClicked="#toggleLeftPanel" pickOnBounds="true" preserveRatio="true" StackPane.alignment="CENTER_LEFT">
|
||||
<image>
|
||||
<Image url="@angle_left_icon.png" />
|
||||
</image>
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</ImageView>
|
||||
<ImageView fx:id="hideRightPanel" fitHeight="24.0" fitWidth="24.0" onMouseClicked="#toggleRightPanel" pickOnBounds="true" preserveRatio="true" StackPane.alignment="CENTER_RIGHT">
|
||||
<image>
|
||||
<Image url="@angle_right_icon.png" />
|
||||
</image>
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</ImageView>
|
||||
</children>
|
||||
</StackPane>
|
||||
<VBox fx:id="rightPanel" prefHeight="200.0" prefWidth="100.0" spacing="8.0">
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h2" text="Connected Users" />
|
||||
<HBox alignment="CENTER_LEFT" spacing="4.0" styleClass="outline-section">
|
||||
<children>
|
||||
<TextField fx:id="usersSearchField" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" promptText="Search" styleClass="text-field-no-outline" HBox.hgrow="ALWAYS" />
|
||||
<ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@search_icon.png" />
|
||||
</image>
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</ImageView>
|
||||
</children>
|
||||
</HBox>
|
||||
<VBox>
|
||||
<children>
|
||||
<VBox fx:id="myUsernameContainer" styleClass="outline-section">
|
||||
<children>
|
||||
<HBox fx:id="myUsernameTextContainer" alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" onMouseClicked="#showMyUsernameInput" spacing="4.0">
|
||||
<children>
|
||||
<VBox alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" styleClass="my-nickname-container" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<Text fx:id="myUsernameText" strokeType="OUTSIDE" strokeWidth="0.0" text="Guest" />
|
||||
</children>
|
||||
</VBox>
|
||||
<ImageView id="editMyNickname" fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@pen_icon.png" />
|
||||
</image>
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</ImageView>
|
||||
</children>
|
||||
</HBox>
|
||||
<HBox id="editMyNickname" fx:id="myUsernameInputContainer" alignment="CENTER_LEFT" maxWidth="1.7976931348623157E308" spacing="4.0">
|
||||
<children>
|
||||
<TextField fx:id="myUsernameInput" maxHeight="1.7976931348623157E308" onKeyPressed="#handleUsernameKeypress" text="Guest" HBox.hgrow="ALWAYS">
|
||||
<styleClass>
|
||||
<String fx:value="edit-nickname-input" />
|
||||
<String fx:value="text-field-no-outline" />
|
||||
</styleClass>
|
||||
</TextField>
|
||||
<ImageView id="saveMyNickname" fitHeight="16.0" fitWidth="16.0" onMouseClicked="#hideMyUsernameInput" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@check_icon.png" />
|
||||
</image>
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</ImageView>
|
||||
</children>
|
||||
</HBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
<styleClass>
|
||||
<String fx:value="menu" />
|
||||
<String fx:value="right-menu" />
|
||||
</styleClass>
|
||||
</VBox>
|
||||
</items>
|
||||
<stylesheets>
|
||||
<URL value="@chat.css" />
|
||||
<URL value="@global.css" />
|
||||
</stylesheets>
|
||||
</SplitPane>
|
||||
BIN
src/main/resources/check_icon.png
Normal file
|
After Width: | Height: | Size: 976 B |
BIN
src/main/resources/connected.mp3
Normal file
@@ -6,10 +6,12 @@
|
||||
<?import javafx.scene.Cursor?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.CheckBox?>
|
||||
<?import javafx.scene.control.ProgressBar?>
|
||||
<?import javafx.scene.control.Separator?>
|
||||
<?import javafx.scene.control.SplitPane?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.BorderPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.StackPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
@@ -19,9 +21,8 @@
|
||||
<items>
|
||||
<VBox fx:id="leftPanel" alignment="TOP_RIGHT" spacing="4.0">
|
||||
<children>
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" styleClass="active" text="Chat" />
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" text="Game" />
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" text="Whiteboard" />
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#returnToChat" text="Chat" />
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" styleClass="active" text="Game" />
|
||||
<Button alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false">
|
||||
<graphic>
|
||||
<CheckBox fx:id="audioEnabled" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" selected="true" text="Sound" />
|
||||
@@ -38,7 +39,7 @@
|
||||
</VBox>
|
||||
<StackPane fx:id="mainStackPane" prefHeight="150.0" prefWidth="200.0">
|
||||
<children>
|
||||
<VBox maxHeight="1.7976931348623157E308" spacing="4.0" styleClass="chat-container">
|
||||
<VBox fx:id="mainContainer" maxHeight="1.7976931348623157E308" spacing="4.0" styleClass="chat-container">
|
||||
<children>
|
||||
<HBox prefHeight="28.0" styleClass="header">
|
||||
<children>
|
||||
@@ -52,8 +53,8 @@
|
||||
</ImageView>
|
||||
<VBox alignment="CENTER_LEFT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h2" text="ECS Chat" />
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="The ultimate chatroom." />
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h2" text="ECS Chat Game" />
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="The ultimate game." />
|
||||
</children>
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
@@ -65,6 +66,16 @@
|
||||
</children>
|
||||
</HBox>
|
||||
<Separator prefWidth="200.0" />
|
||||
<BorderPane fx:id="gameBoardContainer" VBox.vgrow="ALWAYS">
|
||||
<center>
|
||||
<VBox fx:id="gameCoverContainer" alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="16.0" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<Text fx:id="gameCoverTitle" strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h1" text="Play The Game..." />
|
||||
<Button mnemonicParsing="false" onAction="#startGame" styleClass="button-primary" text="Play" />
|
||||
</children>
|
||||
</VBox>
|
||||
</center></BorderPane>
|
||||
<ProgressBar fx:id="progressBar" maxWidth="1.7976931348623157E308" prefHeight="16.0" progress="1.0" />
|
||||
</children>
|
||||
</VBox>
|
||||
<ImageView fx:id="showRightPanel" fitHeight="24.0" fitWidth="24.0" onMouseClicked="#toggleRightPanel" pickOnBounds="true" preserveRatio="true" StackPane.alignment="CENTER_RIGHT">
|
||||
@@ -101,11 +112,31 @@
|
||||
</ImageView>
|
||||
</children>
|
||||
</StackPane>
|
||||
<VBox fx:id="rightPanel" prefHeight="200.0" prefWidth="100.0" spacing="4.0">
|
||||
<VBox fx:id="rightPanel" prefHeight="200.0" prefWidth="100.0" spacing="8.0">
|
||||
<styleClass>
|
||||
<String fx:value="menu" />
|
||||
<String fx:value="right-menu" />
|
||||
</styleClass>
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h2" text="Status" />
|
||||
<VBox spacing="4.0" styleClass="outline-section">
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h3" text="Current score" />
|
||||
<Text fx:id="currentScoreField" strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h1" text="0" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox fx:id="currentColourContainer" spacing="8.0" styleClass="outline-section">
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h3" text="Current colour" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox spacing="8.0" styleClass="outline-section">
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h3" text="High scores" />
|
||||
<VBox fx:id="highScoresContainer" />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</items>
|
||||
<stylesheets>
|
||||
|
||||
@@ -2,17 +2,35 @@
|
||||
root {
|
||||
display: block;
|
||||
}
|
||||
.root > * {
|
||||
-fx-padding: 4px;
|
||||
.root {
|
||||
-fx-border-width: 16px 8px;
|
||||
-fx-border-color: #ffffff;
|
||||
-fx-background-color: #ffffff;
|
||||
}
|
||||
.root > * {
|
||||
-fx-padding: 4px 8px;
|
||||
-fx-background-color: transparent;
|
||||
-fx-border-width: 0px;
|
||||
}
|
||||
* {
|
||||
-fx-font-family: "Roboto";
|
||||
}
|
||||
|
||||
/* scroll panes */
|
||||
.scroll-pane {
|
||||
-fx-background: #ffffff;
|
||||
-fx-border-color: #ffffff;
|
||||
}
|
||||
.scroll-pane:selected, .scroll-pane:focused {
|
||||
-fx-border-color: #ffffff;
|
||||
}
|
||||
.scroll-pane .viewport {
|
||||
-fx-padding: 10px;
|
||||
}
|
||||
|
||||
/* menus */
|
||||
.menu {
|
||||
-fx-padding: 32px 0 0 0;
|
||||
-fx-padding: 32px 0px 32px 0px;
|
||||
}
|
||||
.menu > .button {
|
||||
-fx-text-alignment: left;
|
||||
@@ -45,6 +63,7 @@ root {
|
||||
-fx-border-color: #E1E8EC;
|
||||
-fx-border-radius: 8px;
|
||||
-fx-background-radius: 8px;
|
||||
-fx-cursor: hand;
|
||||
}
|
||||
.button.active {
|
||||
-fx-background-color: #E1E8EC;
|
||||
@@ -59,7 +78,7 @@ root {
|
||||
-fx-border-color: #005C84;
|
||||
}
|
||||
.text-field, .button {
|
||||
-fx-padding: 12px;
|
||||
-fx-padding: 8px 12px;
|
||||
}
|
||||
.text-field {
|
||||
-fx-background-color: transparent;
|
||||
@@ -68,9 +87,18 @@ root {
|
||||
-fx-border-radius: 8px;
|
||||
-fx-background-radius: 8px;
|
||||
-fx-padding: 12px;
|
||||
-fx-font-family: Roboto;
|
||||
}
|
||||
.text-field-no-outline {
|
||||
-fx-background-color: transparent;
|
||||
-fx-border-width: 0px;
|
||||
-fx-padding: 0px;
|
||||
}
|
||||
|
||||
/* headings */
|
||||
.h1 {
|
||||
-fx-font-size: 3em;
|
||||
}
|
||||
.h2 {
|
||||
-fx-font-size: 2em;
|
||||
}
|
||||
@@ -91,3 +119,37 @@ root {
|
||||
-fx-border-radius: 8px;
|
||||
-fx-padding: 12px;
|
||||
}
|
||||
|
||||
/* italics */
|
||||
.italic {
|
||||
-fx-font-style: italic;
|
||||
}
|
||||
|
||||
/* urls */
|
||||
Hyperlink.hyperlink {
|
||||
-fx-underline: true;
|
||||
-fx-text-fill: #005C84;
|
||||
}
|
||||
|
||||
/* split pane dividers */
|
||||
.split-pane > .split-pane-divider {
|
||||
-fx-padding: 0px;
|
||||
}
|
||||
|
||||
/* progress bars */
|
||||
.progress-bar {
|
||||
-fx-border-width: 0px;
|
||||
-fx-background-radius: 8px;
|
||||
-fx-accent: #005C84;
|
||||
}
|
||||
.progress-bar > .bar {
|
||||
-fx-background-insets: 0;
|
||||
-fx-background-radius: 16px;
|
||||
}
|
||||
.progress-bar > .track {
|
||||
-fx-background-radius: 8px;
|
||||
-fx-background-color: transparent;
|
||||
-fx-border-width: 1px;
|
||||
-fx-border-radius: 16px;
|
||||
-fx-border-color: #E1E8EC;
|
||||
}
|
||||
BIN
src/main/resources/incoming.mp3
Normal file
14
src/main/resources/log4j2.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="INFO">
|
||||
<Appenders>
|
||||
<Console name="console" target="SYSTEM_OUT">
|
||||
<PatternLayout
|
||||
pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n" />
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="debug" additivity="false">
|
||||
<AppenderRef ref="console" />
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
29
src/main/resources/login.css
Normal file
@@ -0,0 +1,29 @@
|
||||
/*root {*/
|
||||
/* display: block;*/
|
||||
/*}*/
|
||||
/*.root {*/
|
||||
/* -fx-background-image: url("background.jpg");*/
|
||||
/*}*/
|
||||
/*.label {*/
|
||||
/* -fx-font-size: 12px;*/
|
||||
/* -fx-font-weight: bold;*/
|
||||
/* -fx-text-fill: #333333;*/
|
||||
/* -fx-effect: dropshadow( gaussian , rgba(255,255,255,0.5) , 0,0,0,1 );*/
|
||||
/*}*/
|
||||
|
||||
/*#welcome-text {*/
|
||||
/* -fx-font-size: 32px;*/
|
||||
/* -fx-font-family: "Arial Black";*/
|
||||
/* -fx-fill: #818181;*/
|
||||
/* -fx-effect: innershadow( three-pass-box , rgba(0,0,0,0.7) , 6, 0.0 , 0 , 2 );*/
|
||||
/*}*/
|
||||
|
||||
/*.button {*/
|
||||
/* -fx-text-fill: white;*/
|
||||
/* -fx-font-family: "Arial Narrow";*/
|
||||
/* -fx-font-weight: bold;*/
|
||||
/* -fx-background-color: linear-gradient(#2c9ddd, #7fd0fd);*/
|
||||
/* -fx-border-color: #00446a;*/
|
||||
/* -fx-border-width: 1;*/
|
||||
/*}*/
|
||||
|
||||
42
src/main/resources/login.fxml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import java.net.URL?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.BorderPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<BorderPane prefHeight="600.0" prefWidth="352.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1">
|
||||
|
||||
<stylesheets>
|
||||
<URL value="@login.css" />
|
||||
<URL value="@global.css" />
|
||||
</stylesheets>
|
||||
<center>
|
||||
<VBox alignment="CENTER" maxWidth="480.0" spacing="12.0" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@uos_logo.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" styleClass="h2" text="ECS Chat" />
|
||||
<VBox alignment="CENTER" spacing="4.0">
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Choose a nickname:" />
|
||||
<TextField fx:id="myUsernameInput" alignment="CENTER" onKeyPressed="#handleUsernameKeypress" promptText="Nickname" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets left="12.0" right="12.0" />
|
||||
</padding>
|
||||
</VBox>
|
||||
<Button mnemonicParsing="false" onAction="#handleLogin" styleClass="button-primary" text="Login" />
|
||||
</children>
|
||||
</VBox>
|
||||
</center>
|
||||
|
||||
</BorderPane>
|
||||
BIN
src/main/resources/pen-solid.png
Normal file
|
After Width: | Height: | Size: 1013 B |
BIN
src/main/resources/pen_icon.png
Normal file
|
After Width: | Height: | Size: 1013 B |
BIN
src/main/resources/search_icon.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/main/resources/uos_logo.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/main/resources/uos_logo_square.png
Normal file
|
After Width: | Height: | Size: 401 KiB |