Style: translate comments to english

This commit is contained in:
Julian Kropff
2026-04-01 13:02:14 +02:00
parent cb65ad2ed0
commit 01a72a6719
5 changed files with 55 additions and 54 deletions
@@ -1,12 +1,12 @@
.root { .root {
-fx-background-color: #000000; -fx-background-color: #000000;
-fx-font-family: "Monospaced", "Courier New"; /* Schriftart */ -fx-font-family: "Monospaced", "Courier New"; /* font */
} }
.background { .background {
-fx-background-image: url("/images/background.png"); -fx-background-image: url("/images/background.png");
-fx-background-size: cover; /* Bild füllt das ganze Fenster aus */ -fx-background-size: cover; /* Image fills the entire window */
/* Zentriert das Bild und verhindert, dass es sich kachelartig wiederholt */ /* Centers the image and prevents it from repeating in a tile-like pattern. */
-fx-background-position: center center; -fx-background-position: center center;
-fx-background-repeat: no-repeat; -fx-background-repeat: no-repeat;
} }
@@ -181,20 +181,20 @@
.status-label-small { .status-label-small {
-fx-text-fill: #ffffff; -fx-text-fill: #ffffff;
-fx-font-family: "Monospaced"; /* Schriftart */ -fx-font-family: "Monospaced"; /* font */
-fx-font-size: 15px; -fx-font-size: 15px;
} }
.status-value-text { .status-value-text {
-fx-text-fill: #ffffff; -fx-text-fill: #ffffff;
-fx-font-family: "Monospaced"; /* Schriftart */ -fx-font-family: "Monospaced"; /* font */
-fx-font-size: 15px; -fx-font-size: 15px;
-fx-font-weight: bold; -fx-font-weight: bold;
} }
.status-value-money { .status-value-money {
-fx-text-fill: #ffffff; -fx-text-fill: #ffffff;
-fx-font-family: "Monospaced"; /* Schriftart */ -fx-font-family: "Monospaced"; /* font */
-fx-font-size: 15px; -fx-font-size: 15px;
-fx-font-weight: bold; -fx-font-weight: bold;
} }
@@ -5,7 +5,7 @@
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.image.*?> <?import javafx.scene.image.*?>
<!-- Hauptcontainer: Verknüpft die UI mit dem CasinoGameController und lädt Casinogameui.css --> <!-- Main container: Links the UI to the CasinoGameController and loads Casinogameui.css -->
<AnchorPane xmlns="http://javafx.com/javafx/21" <AnchorPane xmlns="http://javafx.com/javafx/21"
xmlns:fx="http://javafx.com/fxml/1" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.CasinoGameController" fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.CasinoGameController"
@@ -14,28 +14,28 @@
<GridPane prefWidth="1200" prefHeight="800" AnchorPane.topAnchor="0" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0"> <GridPane prefWidth="1200" prefHeight="800" AnchorPane.topAnchor="0" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0">
<columnConstraints> <columnConstraints>
<!-- Tisch-Box: 70% --> <!-- Table-Box: 70% -->
<ColumnConstraints percentWidth="70.0" hgrow="ALWAYS" /> <ColumnConstraints percentWidth="70.0" hgrow="ALWAYS" />
<!-- Leere-Box: 5% --> <!-- Table-Box: 5% -->
<ColumnConstraints percentWidth="5.0" hgrow="ALWAYS" /> <ColumnConstraints percentWidth="5.0" hgrow="ALWAYS" />
<!-- Chat-Box: 20% --> <!-- Table-Box: 20% -->
<ColumnConstraints percentWidth="25.0" hgrow="ALWAYS" /> <ColumnConstraints percentWidth="25.0" hgrow="ALWAYS" />
</columnConstraints> </columnConstraints>
<!-- Sorgt dafür, dass diese Zeile den gesamten verfügbaren vertikalen Platz nutzt --> <!-- Ensures that this line uses all available vertical space -->
<rowConstraints> <rowConstraints>
<RowConstraints vgrow="ALWAYS" /> <RowConstraints vgrow="ALWAYS" />
</rowConstraints> </rowConstraints>
<children> <children>
<!-- Tisch-Box in Spalte 0 --> <!-- Table box in column 0 -->
<StackPane GridPane.columnIndex="0"> <StackPane GridPane.columnIndex="0">
<!-- Innenabstand: Hält den Inhalt 10 Pixel von oben/unten und 20 Pixel von den Seiten fern --> <!-- Inner spacing: Keeps the content 10 pixels away from the top/bottom and 20 pixels from the sides -->
<padding> <padding>
<Insets top="20" right="10" bottom="120" left="20"/> <Insets top="20" right="10" bottom="120" left="20"/>
</padding> </padding>
<!-- Zentraler Casinotisch: Zentriert den Inhalt und nutzt durch die maximale Größe (1.7976931348623157E308) das gesamte Fenster --> <!-- Central Casino Table: Centers the content and utilizes the entire window due to its maximum size (1.7976931348623157E308) -->
<VBox fx:id="casinoTable" <VBox fx:id="casinoTable"
alignment="CENTER" alignment="CENTER"
styleClass="casino-table" styleClass="casino-table"
@@ -44,7 +44,7 @@
maxWidth="Infinity" maxWidth="Infinity"
maxHeight="Infinity"> maxHeight="Infinity">
<!-- TODO: Platzhalter für die Poker-Spielfläche: Hier werden später dynamisch Karten, Chips und Einsätze der Gegner angezeigt --> <!-- TODO: Placeholder for the poker playing area: Cards, chips and opponents' bets will be dynamically displayed here later -->
<HBox alignment="CENTER" spacing="15"> <HBox alignment="CENTER" spacing="15">
<VBox styleClass="dealer-box" prefWidth="80" prefHeight="120" /> <VBox styleClass="dealer-box" prefWidth="80" prefHeight="120" />
<VBox styleClass="dealer-box" prefWidth="80" prefHeight="120" /> <VBox styleClass="dealer-box" prefWidth="80" prefHeight="120" />
@@ -52,7 +52,7 @@
</HBox> </HBox>
<VBox alignment="CENTER" spacing="10"> <VBox alignment="CENTER" spacing="10">
<!-- Label mit Logo --> <!-- Label with logo -->
<Label text="CAS0NO" styleClass="table-title"> <Label text="CAS0NO" styleClass="table-title">
<graphic> <graphic>
<ImageView fitHeight="30.0" preserveRatio="true"> <ImageView fitHeight="30.0" preserveRatio="true">
@@ -63,32 +63,32 @@
</graphic> </graphic>
</Label> </Label>
<!-- TODO: Platzhalter: Wird ersetzt, sobald die GameEngine fertig ist und echte Einsätze verarbeiten kann --> <!-- TODO: Placeholder: Will be replaced once the game engine is finished and can process real-world scenarios -->
<Label fx:id="welcomeText" text="Setzen Sie Ihren Einsatz" styleClass="table-title" /> <Label fx:id="welcomeText" text="Setzen Sie Ihren Einsatz" styleClass="table-title" />
</VBox> </VBox>
</VBox> </VBox>
</StackPane> </StackPane>
<!-- Leere-Box in Spalte 1: Schafft Platz zwischen dem Tisch-Box und der Chat-Box --> <!-- Empty box in column 1: Creates space between the table box and the chat box -->
<VBox GridPane.columnIndex="1" <VBox GridPane.columnIndex="1"
alignment="CENTER" alignment="CENTER"
minWidth="100" minWidth="100"
minHeight="100"> minHeight="100">
<!-- Bleibt leer --> <!-- Leave blank -->
</VBox> </VBox>
<!-- TODO: Platzhalter: Chat-Box in Spalte 2: --> <!-- TODO: Placeholder: Chat box in column 2: -->
<fx:include source="components/Chatbox.fxml" GridPane.columnIndex="2"/> <fx:include source="components/Chatbox.fxml" GridPane.columnIndex="2"/>
</children> </children>
</GridPane> </GridPane>
<!-- verschiebbare Taskbar --> <!-- movable taskbar -->
<AnchorPane> <AnchorPane>
<fx:include fx:id="taskbarInclude" source="gameuicomponents/Taskbar.fxml"/> <fx:include fx:id="taskbarInclude" source="gameuicomponents/Taskbar.fxml"/>
</AnchorPane> </AnchorPane>
<!-- Gegner-Status 1: Eines von drei Panels, das Icon, Name und Kontostand des Mitspielers anzeigt --> <!-- Opponent Status 1: One of three panels displaying the opponent's icon, name, and account balance -->
<GridPane AnchorPane.leftAnchor="0.0" <GridPane AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="50"> AnchorPane.topAnchor="50">
@@ -103,7 +103,7 @@
</children> </children>
</GridPane> </GridPane>
<!-- Gegner-Status 2: Eines von drei Panels, das Icon, Name und Kontostand des Mitspielers anzeigt --> <!-- Opponent Status 2: One of three panels displaying the opponent's icon, name, and account balance -->
<GridPane AnchorPane.leftAnchor="0.0" <GridPane AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="20"> AnchorPane.topAnchor="20">
@@ -118,7 +118,7 @@
</children> </children>
</GridPane> </GridPane>
<!-- Gegner-Status 3: Eines von drei Panels, das Icon, Name und Kontostand des Mitspielers anzeigt --> <!-- Opponent Status 3: One of three panels that displays the opponent's icon, name, and account balance -->
<GridPane AnchorPane.leftAnchor="0.0" <GridPane AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="50"> AnchorPane.topAnchor="50">
@@ -5,16 +5,16 @@
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<!-- <!--
Dieses Fenster wird später mit den Serveranfragen verknüpft, This window will later be linked to the server requests,
um Nachrichten von Mitspielern und Systemmeldungen in Echtzeit anzuzeigen. to display messages from other players and system messages in real time.
Der Chat unterscheidet intern zwischen: The chat internally distinguishes between:
- Player-to-Player (Privater 2-Personen-Chat) - Player-to-Player (Private 2-person chat)
- Lobby-Chat (Aktueller Raum) - Lobby Chat (Current room)
- Globaler Chat (Gesamter Server) - Global Chat (Entire server)
Features, die später implementiert werden sollen: Features planned for later implementation:
- Schicke Chat-Bubbles mit Namen und Uhrzeit. - Stylish chat bubbles with names and timestamps.
--> -->
<VBox xmlns="http://javafx.com/javafx/21" <VBox xmlns="http://javafx.com/javafx/21"
@@ -23,7 +23,7 @@
alignment="CENTER" alignment="CENTER"
stylesheets="@Chatui.css"> stylesheets="@Chatui.css">
<!-- Innenabstand: Schafft oben, rechts und unten 30 Pixel Platz, links nur 10 Pixel (asymmetrisch) --> <!-- Inner spacing: Creates 30 pixels of space at the top, right and bottom, only 10 pixels on the left (asymmetrical) -->
<padding> <padding>
<Insets top="30" right="30" bottom="30" left="10"/> <Insets top="30" right="30" bottom="30" left="10"/>
</padding> </padding>
@@ -38,16 +38,16 @@
<Label text="== CHAT ==" styleClass="chat-header" alignment="CENTER" maxWidth="Infinity"/> <Label text="== CHAT ==" styleClass="chat-header" alignment="CENTER" maxWidth="Infinity"/>
<Region minHeight="4" styleClass="chat-separator"/> <Region minHeight="4" styleClass="chat-separator"/>
<!-- Chatnachrichten werden hier hinzugefügt --> <!-- Chat messages will be added here -->
<ScrollPane fx:id="chatScrollPane" fitToWidth="true" vbarPolicy="AS_NEEDED" hbarPolicy="NEVER" VBox.vgrow="ALWAYS" styleClass="chat-scroll-pane"> <ScrollPane fx:id="chatScrollPane" fitToWidth="true" vbarPolicy="AS_NEEDED" hbarPolicy="NEVER" VBox.vgrow="ALWAYS" styleClass="chat-scroll-pane">
<content> <content>
<VBox fx:id="chatVBox" spacing="10" styleClass="chat-VBox"/> <VBox fx:id="chatVBox" spacing="10" styleClass="chat-VBox"/>
</content> </content>
</ScrollPane> </ScrollPane>
<!-- Eingabebereich --> <!-- Input area -->
<HBox spacing="10"> <HBox spacing="10">
<!-- TODO: Größe des TextFields dynamisch anpassen --> <!-- 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"/> <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"/> <Button fx:id="sendButton" text="SENDEN" onAction="#sendMessage" styleClass="yellow-button"/>
</HBox> </HBox>
@@ -5,10 +5,11 @@
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<!-- <!--
TODO: Haupt-platzhalter für spieler-status & eingabe. TODO: Main placeholder for player status & input.
Dieses Layout dient aktuell der visuellen Struktur. Sobald die GameEngine und
Serveranfragen (API/Requests) durchgeführt werden können, werden Name, Kontostand This layout currently serves as a visual structure. As soon as the game engine and
und Status-Anzeigen dynamisch mit Echtzeit-Daten vom Server befüllt. server requests (API/requests) can be processed, the name, account balance
and status displays will be dynamically populated with real-time data from the server.
--> -->
<VBox fx:id="playerStatusBox" <VBox fx:id="playerStatusBox"
@@ -20,7 +21,7 @@
spacing="0"> spacing="0">
<children> <children>
<!-- Bereich für den Spielernamen --> <!-- Area for player name -->
<HBox styleClass="status-inner-box-top" <HBox styleClass="status-inner-box-top"
alignment="CENTER_LEFT" alignment="CENTER_LEFT"
maxWidth="Infinity" maxWidth="Infinity"
@@ -31,11 +32,11 @@
</padding> </padding>
<Label text="NAME: " styleClass="status-label-small"/> <Label text="NAME: " styleClass="status-label-small"/>
<!-- TODO: fx:id="playerName": Wird später durch den User-Namen aus der Server-Abfrage ersetzt --> <!-- TODO: fx:id="playerName": Will later be replaced by the username from the server query -->
<Label fx:id="playerName" text="SPIELER" styleClass="status-value-text"/> <Label fx:id="playerName" text="SPIELER" styleClass="status-value-text"/>
</HBox> </HBox>
<!-- Schaft platz zwischen den Boxen --> <!-- Shaft space between the boxes -->
<HBox styleClass="status-inner-box-midle" <HBox styleClass="status-inner-box-midle"
alignment="CENTER_LEFT" alignment="CENTER_LEFT"
maxWidth="Infinity" maxWidth="Infinity"
@@ -46,7 +47,7 @@
</padding> </padding>
</HBox> </HBox>
<!-- Anzeige des Kapitals/Geldstands --> <!-- Display of capital/money balance -->
<HBox styleClass="status-inner-box-bottom" <HBox styleClass="status-inner-box-bottom"
alignment="CENTER_LEFT" alignment="CENTER_LEFT"
maxWidth="Infinity" maxWidth="Infinity"
@@ -60,7 +61,7 @@
<Label fx:id="playerMoney" text="0 $" styleClass="status-value-money"/> <Label fx:id="playerMoney" text="0 $" styleClass="status-value-money"/>
</HBox> </HBox>
<!-- TODO: User-Logo oder Icon: Platzhalter für das Profilbild oder das individuelle Logo des Spielers --> <!-- TODO: User logo or icon: Placeholder for the profile picture or the player's individual logo -->
<Pane prefHeight="0" maxWidth="Infinity"> <Pane prefHeight="0" maxWidth="Infinity">
<Region styleClass="status-circle" <Region styleClass="status-circle"
layoutX="-10" layoutX="-10"
@@ -4,7 +4,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<!-- verschiebbare Taskbar --> <!-- movable taskbar -->
<HBox xmlns="http://javafx.com/javafx/21" <HBox xmlns="http://javafx.com/javafx/21"
xmlns:fx="http://javafx.com/fxml/1" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.gameuicomponents.TaskbarController" fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.gameuicomponents.TaskbarController"
@@ -17,36 +17,36 @@
onMouseReleased="#onTaskbarReleased" onMouseReleased="#onTaskbarReleased"
layoutX="50.0" layoutY="710.0"> layoutX="50.0" layoutY="710.0">
<!-- Platzhalter-Buttons --> <!-- Placeholder buttons -->
<Button text="EINSTELLUNGEN" styleClass="gray-button" /> <Button text="EINSTELLUNGEN" styleClass="gray-button" />
<Button text="INFO" styleClass="gray-button" /> <Button text="INFO" styleClass="gray-button" />
<!-- Buten für den Casono Browser --> <!-- Buten for the Casono Browser -->
<Button text="HILFE" onAction="#onBrowserButtonClick" styleClass="gray-button" /> <Button text="HILFE" onAction="#onBrowserButtonClick" styleClass="gray-button" />
<!-- Vertikale-Trennlinie: Erzeugt eine optische Abgrenzung zwischen zwei Butten-Bereichen --> <!-- Vertical dividing line: Creates a visual separation between two button areas -->
<Separator orientation="VERTICAL" prefHeight="20" opacity="0.3" /> <Separator orientation="VERTICAL" prefHeight="20" opacity="0.3" />
<!-- Eingabefeld: Reagiert auf die Enter-Taste, um den Einsatz zu bestätigen --> <!-- Input field: Responds to the Enter key to confirm the entry -->
<TextField fx:id="taskbarInput" <TextField fx:id="taskbarInput"
promptText="Betrag setzen..." promptText="Betrag setzen..."
onKeyPressed="#onInputSubmitted" onKeyPressed="#onInputSubmitted"
styleClass="gray-input-field" styleClass="gray-input-field"
prefWidth="150" /> prefWidth="150" />
<!-- Bestätigungs-Button: Alternative zum Enter-Key, um den Einsatz abzusenden --> <!-- Confirmation button: Alternative to the Enter key to submit the entry -->
<Button text="SETZTEN" <Button text="SETZTEN"
onAction="#onInputSubmittedAction" onAction="#onInputSubmittedAction"
styleClass="yellow-button"/> styleClass="yellow-button"/>
<!-- Vertikale-Trennlinie: Erzeugt eine optische Abgrenzung zwischen zwei Butten-Bereichen --> <!-- Vertical dividing line: Creates a visual separation between two button areas -->
<Separator orientation="VERTICAL" prefHeight="20" opacity="0.3" /> <Separator orientation="VERTICAL" prefHeight="20" opacity="0.3" />
<!-- Menü-Button: Bricht das aktuelle Spiel ab und kehrt zum Hauptmenü zurück --> <!-- Menu button: Cancels the current game and returns to the main menu -->
<Button text="VERLASSEN" <Button text="VERLASSEN"
onAction="#onExitButtonClick" onAction="#onExitButtonClick"
styleClass="red-button"/> styleClass="red-button"/>
<!-- Innenabstand: Hält den Inhalt 10 Pixel von oben/unten und 20 Pixel von den Seiten fern --> <!-- Inner spacing: Keeps the content 10 pixels away from the top/bottom and 20 pixels from the sides -->
<padding> <padding>
<Insets top="10" right="20" bottom="10" left="20"/> <Insets top="10" right="20" bottom="10" left="20"/>
</padding> </padding>