This repository has been archived on 2026-05-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Programmierprojekt/src/main/resources/ui-structure/Casinogameui.fxml
T
2026-04-22 14:18:50 +02:00

173 lines
6.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.image.*?>
<?import ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.CasinoGameController?>
<!-- Main container: Links the UI to the CasinoGameController and loads Casinogameui.css -->
<AnchorPane xmlns="http://javafx.com/javafx/21"
xmlns:fx="http://javafx.com/fxml/1"
fx:controller="CasinoGameController"
styleClass="background"
stylesheets="@Casinogameui.css">
<GridPane prefWidth="1200" prefHeight="800" AnchorPane.topAnchor="0" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0">
<columnConstraints>
<!-- Table-Box: 70% -->
<ColumnConstraints percentWidth="70.0" hgrow="ALWAYS" />
<!-- Table-Box: 5% -->
<ColumnConstraints percentWidth="5.0" hgrow="ALWAYS" />
<!-- Table-Box: 20% -->
<ColumnConstraints percentWidth="25.0" hgrow="ALWAYS" />
</columnConstraints>
<!-- Ensures that this line uses all available vertical space -->
<rowConstraints>
<RowConstraints vgrow="ALWAYS" />
</rowConstraints>
<children>
<!-- Table box in column 0 -->
<StackPane GridPane.columnIndex="0">
<!-- Inner spacing: Keeps the content 10 pixels away from the top/bottom and 20 pixels from the sides -->
<padding>
<Insets top="20" right="10" bottom="120" left="20"/>
</padding>
<!-- Central Casino Table: Centers the content and utilizes the entire window due to its maximum size (1.7976931348623157E308) -->
<VBox fx:id="casinoTable"
alignment="CENTER"
styleClass="casino-table"
spacing="20"
maxWidth="Infinity"
maxHeight="Infinity">
<!-- Inner box: Contains the header, community cards, and pot box.-->
<VBox fx:id="casinoTableInnerBox"
spacing="15"
alignment="CENTER"
AnchorPane.topAnchor="0"
AnchorPane.bottomAnchor="0"
AnchorPane.leftAnchor="0"
AnchorPane.rightAnchor="0">
<!-- HEADER -->
<VBox alignment="CENTER" spacing="5">
<Label text="CAS0NO" styleClass="table-title">
<graphic>
<ImageView fitHeight="30.0" preserveRatio="true">
<image>
<Image url="@/images/logo.png" />
</image>
</ImageView>
</graphic>
</Label>
<Label fx:id="tableText"
text="Place your bet"
styleClass="table-title" />
</VBox>
<!-- Community Cards -->
<HBox fx:id="communityCardsBox"
styleClass="community-cards-box"
alignment="CENTER"
spacing="10"/>
<!-- Pot Box -->
<HBox fx:id="potBox"
alignment="CENTER"
spacing="4"
maxWidth="Infinity"
maxHeight="Infinity"/>
</VBox>
</VBox>
<!-- Player Cards -->
<HBox fx:id="playerCardsBox"
spacing="10"
alignment="CENTER"
StackPane.alignment="BOTTOM_CENTER">
<ImageView fx:id="myDealerIcon"
styleClass="dealer-box"
fitWidth="100"
fitHeight="100"
preserveRatio="true"
visible="false"/>
</HBox>
</StackPane>
<!-- Empty box in column 1: Creates space between the table box and the chat box -->
<VBox GridPane.columnIndex="1"
alignment="CENTER"
minWidth="100"
minHeight="100">
<!-- Leave blank -->
</VBox>
<!-- RIGHT SIDE (Chat Box) -->
<AnchorPane fx:id="chatContainer" GridPane.columnIndex="2" />
</children>
</GridPane>
<!-- movable taskbar -->
<AnchorPane>
<fx:include fx:id="taskbarInclude" source="gameuicomponents/Taskbar.fxml"/>
</AnchorPane>
<!-- Opponent Status 1: One of three panels displaying the opponent's icon, name, and account balance -->
<GridPane AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="50">
<columnConstraints>
<ColumnConstraints percentWidth="5"/>
<ColumnConstraints percentWidth="16"/>
</columnConstraints>
<children>
<fx:include fx:id="player1" source="gameuicomponents/Playerstatus.fxml" GridPane.columnIndex="1"/>
</children>
</GridPane>
<!-- Opponent Status 2: One of three panels displaying the opponent's icon, name, and account balance -->
<GridPane AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="20">
<columnConstraints>
<ColumnConstraints percentWidth="30"/>
<ColumnConstraints percentWidth="16"/>
</columnConstraints>
<children>
<fx:include fx:id="player2" source="gameuicomponents/Playerstatus.fxml" GridPane.columnIndex="1"/>
</children>
</GridPane>
<!-- Opponent Status 3: One of three panels that displays the opponent's icon, name, and account balance -->
<GridPane AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="50">
<columnConstraints>
<ColumnConstraints percentWidth="55"/>
<ColumnConstraints percentWidth="16"/>
</columnConstraints>
<children>
<fx:include fx:id="player3" source="gameuicomponents/Playerstatus.fxml" GridPane.columnIndex="1"/>
</children>
</GridPane>
</AnchorPane>