Merge branch 'main' into feat/game-ui
# Conflicts: # src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/GameClient.java # src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameUI.java # src/main/resources/ui-structure/Casinogameui.fxml
This commit is contained in:
@@ -123,7 +123,7 @@
|
||||
</VBox>
|
||||
|
||||
<!-- RECHTER BEREICH (Info-Box) -->
|
||||
<fx:include source="components/Chatbox.fxml" GridPane.columnIndex="2"/>
|
||||
<fx:include source="components/chatui/chatbox.fxml" GridPane.columnIndex="2"/>
|
||||
</children>
|
||||
</GridPane>
|
||||
</AnchorPane>
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
|
||||
<!--
|
||||
This window will later be linked to the server requests,
|
||||
to display messages from other players and system messages in real time.
|
||||
|
||||
The chat internally distinguishes between:
|
||||
- Player-to-Player (Private 2-person chat)
|
||||
- Lobby Chat (Current room)
|
||||
- Global Chat (Entire server)
|
||||
|
||||
Features planned for later implementation:
|
||||
- Stylish chat bubbles with names and timestamps.
|
||||
-->
|
||||
|
||||
<VBox xmlns="http://javafx.com/javafx/21"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.chatui.ChatViewController"
|
||||
alignment="CENTER"
|
||||
stylesheets="@Chatui.css">
|
||||
|
||||
<!-- Inner spacing: Creates 30 pixels of space at the top, right and bottom, only 10 pixels on the left (asymmetrical) -->
|
||||
<padding>
|
||||
<Insets top="30" right="30" bottom="30" left="10"/>
|
||||
</padding>
|
||||
|
||||
<children>
|
||||
<VBox VBox.vgrow="ALWAYS"
|
||||
styleClass="chat-box"
|
||||
spacing="10"
|
||||
maxWidth="Infinity">
|
||||
|
||||
<children>
|
||||
<Label text="== CHAT ==" styleClass="chat-header" alignment="CENTER" maxWidth="Infinity"/>
|
||||
<Region minHeight="4" styleClass="chat-separator"/>
|
||||
|
||||
<!-- Chat messages will be added here -->
|
||||
<ScrollPane fx:id="chatScrollPane" fitToWidth="true" vbarPolicy="AS_NEEDED" hbarPolicy="NEVER" VBox.vgrow="ALWAYS" styleClass="chat-scroll-pane">
|
||||
<content>
|
||||
<VBox fx:id="chatVBox" spacing="10" styleClass="chat-VBox"/>
|
||||
</content>
|
||||
</ScrollPane>
|
||||
|
||||
<!-- Input area -->
|
||||
<HBox spacing="10">
|
||||
<!-- TODO: Dynamically adjust the size of the text field -->
|
||||
<TextField fx:id="inputField" HBox.hgrow="ALWAYS" promptText="Nachricht eingeben..." styleClass="gray-input-field" onAction="#sendMessage"/>
|
||||
<Button fx:id="sendButton" text="SENDEN" onAction="#sendMessage" styleClass="yellow-button"/>
|
||||
</HBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</VBox>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<VBox xmlns="http://javafx.com/javafx/21"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:id="chatBox"
|
||||
VBox.vgrow="ALWAYS"
|
||||
stylesheets="@chatui.css"
|
||||
styleClass="chat-box"
|
||||
spacing="10"
|
||||
maxWidth="Infinity">
|
||||
|
||||
<HBox spacing="10"
|
||||
fx:id="menuBox">
|
||||
|
||||
<Label text="== CHAT ==" styleClass="chat-header" alignment="CENTER" maxWidth="Infinity"/>
|
||||
<Region HBox.hgrow="ALWAYS"/>
|
||||
<MenuButton fx:id="addWhisperChatButton" styleClass="yellow-button" text="WHISPER CHAT"
|
||||
alignment="CENTER_RIGHT">
|
||||
</MenuButton>
|
||||
</HBox>
|
||||
|
||||
<TabPane fx:id="chatTabPane"
|
||||
VBox.vgrow="ALWAYS"
|
||||
styleClass="tab-header-area">
|
||||
|
||||
</TabPane>
|
||||
|
||||
</VBox>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<!-- VBox for the global chat, should only be visible when activated via changeGlobalChatButton-->
|
||||
|
||||
<VBox fx:id="chatInterfaceVBox"
|
||||
maxWidth="Infinity"
|
||||
spacing="10"
|
||||
styleClass="chat-box"
|
||||
stylesheets="@chatui.css"
|
||||
VBox.vgrow="ALWAYS"
|
||||
xmlns="http://javafx.com/javafx/17.0.12"
|
||||
xmlns:fx="http://javafx.com/fxml/1">
|
||||
|
||||
<children>
|
||||
<!-- Chatnachrichten werden hier hinzugefügt -->
|
||||
<ScrollPane fx:id="scrollPane" fitToWidth="true" vbarPolicy="AS_NEEDED" hbarPolicy="NEVER" styleClass="chat-scroll-pane" VBox.vgrow="ALWAYS">
|
||||
<content>
|
||||
<VBox fx:id="chat" spacing="10" styleClass="chat-VBox" />
|
||||
</content>
|
||||
</ScrollPane>
|
||||
|
||||
<!-- Eingabebereich -->
|
||||
<HBox fx:id="controlBar" spacing="10">
|
||||
<!-- TODO: Größe des TextFields dynamisch anpassen -->
|
||||
<TextField fx:id="inputField" promptText="Nachricht eingeben..." styleClass="gray-input-field" HBox.hgrow="ALWAYS" />
|
||||
<Button fx:id="sendButton" styleClass="yellow-button" text="SENDEN" />
|
||||
</HBox>
|
||||
</children>
|
||||
|
||||
|
||||
</VBox>
|
||||
+53
-2
@@ -5,7 +5,7 @@
|
||||
-fx-border-color: #5c3d10 #3d260a #3d260a #5c3d10;
|
||||
-fx-border-width: 12;
|
||||
-fx-padding: 20;
|
||||
-fx-effect: dropshadow(one-pass-box, rgba(0,0,0,1), 0, 0, 15, 15);
|
||||
/*-fx-effect: dropshadow(one-pass-box, rgba(0,0,0,1), 0, 0, 15, 15);*/
|
||||
}
|
||||
|
||||
.chat-header {
|
||||
@@ -83,7 +83,7 @@
|
||||
.gray-button {
|
||||
-fx-background-color: #333333;
|
||||
-fx-border-color: #666666;
|
||||
-fx-text-fill: #cccccc;
|
||||
-fx-text-fill: #ffffff;
|
||||
}
|
||||
|
||||
.gray-button, .yellow-button, .red-button {
|
||||
@@ -153,3 +153,54 @@
|
||||
.scroll-pane .scroll-bar:horizontal .thumb:hover {
|
||||
-fx-pref-height: 10;
|
||||
}
|
||||
|
||||
.tab-pane .tab-header-area .tab-header-background {
|
||||
-fx-opacity: 0;
|
||||
-fx-background-color: #0d9e3b;
|
||||
-fx-background-radius: 18;
|
||||
-fx-border-radius: 10;
|
||||
-fx-border-color: #5c3d10 #3d260a #3d260a #5c3d10;
|
||||
-fx-border-width: 5;
|
||||
-fx-padding: 10;
|
||||
-fx-effect: dropshadow(one-pass-box, rgba(0,0,0,1), 0, 0, 15, 15);
|
||||
-fx-max-height: 10;
|
||||
}
|
||||
|
||||
.tab-pane .tab {
|
||||
-fx-background-color: #0d9e3b;
|
||||
-fx-background-radius: 18;
|
||||
-fx-border-radius: 10;
|
||||
-fx-border-color: #5c3d10 #3d260a #3d260a #5c3d10;
|
||||
-fx-border-width: 5;
|
||||
-fx-padding: 10;
|
||||
}
|
||||
|
||||
.tab-pane .tab:selected {
|
||||
-fx-background-color: #0d763b;
|
||||
-fx-background-radius: 18;
|
||||
-fx-border-radius: 10;
|
||||
-fx-border-color: #5c3d10 #3d260a #3d260a #5c3d10;
|
||||
-fx-border-width: 5;
|
||||
-fx-padding: 10;
|
||||
}
|
||||
|
||||
.tab-pane .tab .tab-close-button {
|
||||
-fx-text-fill: #0d9e3b;
|
||||
}
|
||||
|
||||
.tab-pane .tab-header-area .headers-region {
|
||||
-fx-background-color: #0d9e3b;
|
||||
}
|
||||
|
||||
|
||||
.tab .tab-label {
|
||||
-fx-alignment: CENTER;
|
||||
-fx-text-fill: #ffffff;
|
||||
-fx-font-size: 12px;
|
||||
-fx-font-weight: bold;
|
||||
}
|
||||
|
||||
.tab:selected .tab-label {
|
||||
-fx-alignment: CENTER;
|
||||
-fx-text-fill: #ffffff;
|
||||
}
|
||||
Reference in New Issue
Block a user