Fix: small changes to ChatUI

This commit is contained in:
Mathis Ginkel
2026-04-03 15:52:03 +02:00
parent aca61cbd52
commit d1d2fb30e8
11 changed files with 85 additions and 57 deletions
@@ -106,7 +106,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>
@@ -14,10 +14,10 @@
- Globaler Chat (Gesamter Server)
Features, die später implementiert werden sollen:
- Schicke Chat-Bubbles mit Namen und Uhrzeit.
- Schicke Chat-Bubbles mit Namen und Uhrzeit./home/mathis/dev/Gruppe-13/src/main/resources/ui-structure/gameuicomponents/chatui
-->
<VBox xmlns="http://javafx.com/javafx/21"
<StackPane 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"
@@ -28,24 +28,22 @@
<Insets top="30" right="30" bottom="30" left="10"/>
</padding>
<children>
<fx:include source="globalchat.fxml"/>
<fx:include source="globalchat.fxml"/>
<fx:include source="lobbychat.fxml"/>
<fx:include source="lobbychat.fxml"/>
<fx:include source="whisperchat.fxml"/>
<fx:include source="whisperchat.fxml"/>
<ButtonBar fx:id="buttonBar">
<padding>
<Insets>...</Insets>
</padding>
<buttons>
<ToggleButton fx:id="changeGlobalChatButton" text="Global Chat" onAction="#" styleClass="yellow-button"/>
<ToggleButton fx:id="changeLobbyChatButton" text="Lobby Chat" onAction="#" styleClass="yellow-button"/>
<ToggleButton fx:id="changeWhisperChatButton" text="Whisper Chat" onAction="#" styleClass="yellow-button"/>
</buttons>
</ButtonBar>
<ButtonBar fx:id="buttonBar">
<padding>
<Insets>...</Insets>
</padding>
<buttons>
<ToggleButton fx:id="changeGlobalChatButton" text="Global Chat" onAction="#switchChat" styleClass="yellow-button"/>
<ToggleButton fx:id="changeLobbyChatButton" text="Lobby Chat" styleClass="yellow-button"/>
<ToggleButton fx:id="changeWhisperChatButton" text="Whisper Chat" styleClass="yellow-button"/>
</buttons>
</ButtonBar>
</children>
</VBox>
</StackPane>
@@ -7,7 +7,9 @@
<?import javafx.scene.layout.*?>
<!-- VBox for the global chat, should only be visible when activated via changeGlobalChatButton-->
<VBox fx:id="globalChatVBox"
<VBox xmlns="http://javafx.com/javafx/21"
xmlns:fx="http://javafx.com/fxml/1"
fx:id="globalChatVBox"
VBox.vgrow="ALWAYS"
styleClass="chat-box"
spacing="10"
@@ -15,26 +17,23 @@
visible="true"
fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.chatui.GlobalChatView">
<children>
<Label text="== GLOBAL CHAT ==" styleClass="chat-header" alignment="CENTER" maxWidth="Infinity"/>
<Region minHeight="4" styleClass="chat-separator"/>
<Label text="== GLOBAL CHAT ==" styleClass="chat-header" alignment="CENTER" maxWidth="Infinity"/>
<Region minHeight="4" styleClass="chat-separator"/>
<!-- Chatnachrichten werden hier hinzugefügt -->
<ScrollPane fx:id="globalChatScrollPane" fitToWidth="true" vbarPolicy="AS_NEEDED" hbarPolicy="NEVER"
VBox.vgrow="ALWAYS" styleClass="chat-scroll-pane">
<content>
<VBox fx:id="globalChat" spacing="10" styleClass="chat-VBox"/>
</content>
</ScrollPane>
<!-- Chatnachrichten werden hier hinzugefügt -->
<ScrollPane fx:id="globalChatScrollPane" fitToWidth="true" vbarPolicy="AS_NEEDED" hbarPolicy="NEVER"
VBox.vgrow="ALWAYS" styleClass="chat-scroll-pane">
<content>
<VBox fx:id="globalChat" spacing="10" styleClass="chat-VBox"/>
</content>
</ScrollPane>
<!-- Eingabebereich -->
<HBox spacing="10">
<!-- TODO: Größe des TextFields dynamisch anpassen -->
<TextField fx:id="globalChatInputField" HBox.hgrow="ALWAYS" promptText="Nachricht eingeben..."
styleClass="gray-input-field" onAction="#sendGlobalMessage"/>
<Button fx:id="globalChatSendButton" text="SENDEN" onAction="#sendGlobalMessage"
styleClass="yellow-button"/>
</HBox>
</children>
<!-- Eingabebereich -->
<HBox spacing="10">
<!-- TODO: Größe des TextFields dynamisch anpassen -->
<TextField fx:id="globalChatInputField" HBox.hgrow="ALWAYS" promptText="Nachricht eingeben..."
styleClass="gray-input-field" onAction="#sendGlobalMessage"/>
<Button fx:id="globalChatSendButton" text="SENDEN" onAction="#sendGlobalMessage"
styleClass="yellow-button"/>
</HBox>
</VBox>
@@ -8,7 +8,9 @@
<!-- VBox for the lobby chat, should only be visible when activated via changeLobbyChatButton-->
<VBox fx:id="lobbyChatVBox"
<VBox xmlns="http://javafx.com/javafx/21"
xmlns:fx="http://javafx.com/fxml/1"
fx:id="lobbyChatVBox"
VBox.vgrow="ALWAYS"
styleClass="chat-box"
spacing="10"
@@ -8,7 +8,9 @@
<!-- VBox for the whisper chat, should only be visible when activated via changeWhisperChatButton-->
<VBox fx:id="whisperChatVBox"
<VBox xmlns="http://javafx.com/javafx/21"
xmlns:fx="http://javafx.com/fxml/1"
fx:id="whisperChatVBox"
VBox.vgrow="ALWAYS"
styleClass="chat-box"
spacing="10"