feat(game-ui): add Casinogameui FXML layout
This commit is contained in:
@@ -0,0 +1,135 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
<?import javafx.geometry.Insets?>
|
||||||
|
<?import javafx.scene.image.*?>
|
||||||
|
|
||||||
|
<!-- Hauptcontainer: Verknüpft die UI mit dem Java-Controller und lädt das CSS-Design -->
|
||||||
|
<AnchorPane xmlns="http://javafx.com/javafx/21"
|
||||||
|
xmlns:fx="http://javafx.com/fxml/1"
|
||||||
|
fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.lobbyui.Casinogamecontroller"
|
||||||
|
styleClass="background"
|
||||||
|
stylesheets="@Casinogameui.css">
|
||||||
|
|
||||||
|
<GridPane prefWidth="1200" prefHeight="800" AnchorPane.topAnchor="0" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0">
|
||||||
|
<columnConstraints>
|
||||||
|
<!-- Tisch-Box: 70% -->
|
||||||
|
<ColumnConstraints percentWidth="70.0" hgrow="ALWAYS" />
|
||||||
|
<!-- Leere-Box: 5% -->
|
||||||
|
<ColumnConstraints percentWidth="5.0" hgrow="ALWAYS" />
|
||||||
|
<!-- Chat-Box: 20% -->
|
||||||
|
<ColumnConstraints percentWidth="25.0" hgrow="ALWAYS" />
|
||||||
|
</columnConstraints>
|
||||||
|
|
||||||
|
<!-- Sorgt dafür, dass diese Zeile den gesamten verfügbaren vertikalen Platz nutzt -->
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
|
</rowConstraints>
|
||||||
|
|
||||||
|
<children>
|
||||||
|
<!-- Tisch-Box in Spalte 0 -->
|
||||||
|
<StackPane GridPane.columnIndex="0">
|
||||||
|
<!-- Innenabstand: Hält den Inhalt 10 Pixel von oben/unten und 20 Pixel von den Seiten fern -->
|
||||||
|
<padding>
|
||||||
|
<Insets top="20" right="10" bottom="120" left="20"/>
|
||||||
|
</padding>
|
||||||
|
|
||||||
|
<!-- Zentraler Casinotisch: Zentriert den Inhalt und nutzt durch die maximale Größe (1.7976931348623157E308) das gesamte Fenster -->
|
||||||
|
<VBox fx:id="casinoTable"
|
||||||
|
alignment="CENTER"
|
||||||
|
styleClass="casino-table"
|
||||||
|
spacing="20"
|
||||||
|
onMouseClicked="#onTableClick"
|
||||||
|
maxWidth="Infinity"
|
||||||
|
maxHeight="Infinity">
|
||||||
|
|
||||||
|
<!-- TODO: Platzhalter für die Poker-Spielfläche: Hier werden später dynamisch Karten, Chips und Einsätze der Gegner angezeigt -->
|
||||||
|
<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" />
|
||||||
|
</HBox>
|
||||||
|
|
||||||
|
<VBox alignment="CENTER" spacing="10">
|
||||||
|
<!-- Label mit Logo -->
|
||||||
|
<Label text="CAS0NO" styleClass="table-title">
|
||||||
|
<graphic>
|
||||||
|
<ImageView fitHeight="30.0" preserveRatio="true">
|
||||||
|
<image>
|
||||||
|
<Image url="@/images/logo.png" />
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
</graphic>
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
<!-- TODO: Platzhalter: Wird ersetzt, sobald die GameEngine fertig ist und echte Einsätze verarbeiten kann -->
|
||||||
|
<Label fx:id="welcomeText" text="Setzen Sie Ihren Einsatz" styleClass="table-title" />
|
||||||
|
</VBox>
|
||||||
|
</VBox>
|
||||||
|
</StackPane>
|
||||||
|
|
||||||
|
<!-- Leere-Box in Spalte 1: Schafft Platz zwischen dem Tisch-Box und der Chat-Box -->
|
||||||
|
<VBox GridPane.columnIndex="1"
|
||||||
|
alignment="CENTER"
|
||||||
|
minWidth="100"
|
||||||
|
minHeight="100">
|
||||||
|
<!-- Bleibt leer -->
|
||||||
|
</VBox>
|
||||||
|
|
||||||
|
<!-- TODO: Platzhalter: Chat-Box in Spalte 2: -->
|
||||||
|
<fx:include source="gameuicomponents/chatbox.fxml" GridPane.columnIndex="2"/>
|
||||||
|
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
|
||||||
|
<!-- verschiebbare Taskbar -->
|
||||||
|
<AnchorPane>
|
||||||
|
<fx:include fx:id="taskbarInclude" source="gameuicomponents/taskbar.fxml"/>
|
||||||
|
</AnchorPane>
|
||||||
|
|
||||||
|
<!-- Gegner-Status 1: Eines von drei Panels, das Icon, Name und Kontostand des Mitspielers anzeigt -->
|
||||||
|
<GridPane AnchorPane.leftAnchor="0.0"
|
||||||
|
AnchorPane.rightAnchor="0.0"
|
||||||
|
AnchorPane.topAnchor="50">
|
||||||
|
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints percentWidth="5"/>
|
||||||
|
<ColumnConstraints percentWidth="16"/>
|
||||||
|
</columnConstraints>
|
||||||
|
|
||||||
|
<children>
|
||||||
|
<fx:include source="gameuicomponents/playerstatus.fxml" GridPane.columnIndex="1"/>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
|
||||||
|
<!-- Gegner-Status 2: Eines von drei Panels, das Icon, Name und Kontostand des Mitspielers anzeigt -->
|
||||||
|
<GridPane AnchorPane.leftAnchor="0.0"
|
||||||
|
AnchorPane.rightAnchor="0.0"
|
||||||
|
AnchorPane.topAnchor="20">
|
||||||
|
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints percentWidth="30"/>
|
||||||
|
<ColumnConstraints percentWidth="16"/>
|
||||||
|
</columnConstraints>
|
||||||
|
|
||||||
|
<children>
|
||||||
|
<fx:include source="gameuicomponents/playerstatus.fxml" GridPane.columnIndex="1"/>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
|
||||||
|
<!-- Gegner-Status 3: Eines von drei Panels, das Icon, Name und Kontostand des Mitspielers anzeigt -->
|
||||||
|
<GridPane AnchorPane.leftAnchor="0.0"
|
||||||
|
AnchorPane.rightAnchor="0.0"
|
||||||
|
AnchorPane.topAnchor="50">
|
||||||
|
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints percentWidth="55"/>
|
||||||
|
<ColumnConstraints percentWidth="16"/>
|
||||||
|
</columnConstraints>
|
||||||
|
|
||||||
|
<children>
|
||||||
|
<fx:include source="gameuicomponents/playerstatus.fxml" GridPane.columnIndex="1"/>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
</AnchorPane>
|
||||||
Reference in New Issue
Block a user