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

181 lines
6.8 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.*?>
<!-- Main container: Links the UI to the CasinoGameController and loads Casinogameui.css -->
<AnchorPane fx:id="rootPane"
xmlns="http://javafx.com/javafx/21"
xmlns:fx="http://javafx.com/fxml/1"
fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.CasinoGameController"
styleClass="background">
<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"
mouseTransparent="false"
pickOnBounds="false"
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="Welcome! The game starts when 4 players are present..."
styleClass="table-title" />
</VBox>
<!-- Community Cards -->
<HBox fx:id="communityCardsBox"
styleClass="community-cards-box"
alignment="CENTER"
GridPane.columnIndex="2"
spacing="10"/>
<!-- Pot Box -->
<HBox fx:id="potBox"
alignment="CENTER"
spacing="4"
GridPane.columnIndex="2"
maxWidth="Infinity"
maxHeight="Infinity"/>
</VBox>
</VBox>
<!-- Player Cards -->
<HBox fx:id="playerCardsBox"
styleClass="player-cards-box"
spacing="10"
alignment="CENTER"
StackPane.alignment="BOTTOM_CENTER">
<ImageView fx:id="myDealerIcon"
styleClass="dealer-box"
fitWidth="100"
fitHeight="100"
GridPane.columnIndex="2"
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" />
<HBox AnchorPane.topAnchor="45"
AnchorPane.leftAnchor="0"
AnchorPane.rightAnchor="0"
alignment="CENTER"
spacing="300">
<VBox HBox.hgrow="ALWAYS"
alignment="TOP_LEFT"
translateX="50"
translateY="50">
<fx:include fx:id="player1"
source="gameuicomponents/Playerstatus.fxml"/>
</VBox>
<VBox HBox.hgrow="ALWAYS"
alignment="TOP_CENTER"
translateY="20">
<fx:include fx:id="player2"
source="gameuicomponents/Playerstatus.fxml"/>
</VBox>
<VBox HBox.hgrow="ALWAYS"
alignment="TOP_RIGHT"
translateX="-50"
translateY="50">
<fx:include fx:id="player3"
source="gameuicomponents/Playerstatus.fxml"/>
</VBox>
</HBox>
</children>
</GridPane>
<!-- movable taskbar -->
<AnchorPane pickOnBounds="false">
<fx:include fx:id="taskbarInclude" source="gameuicomponents/Taskbar.fxml" GridPane.columnIndex="1"/>
</AnchorPane>
<!-- movable notebook (Tips Box) -->
<AnchorPane pickOnBounds="false">
<fx:include fx:id="notebookInclude" source="gameuicomponents/Notebook.fxml" GridPane.columnIndex="1"/>
</AnchorPane>
<!-- movable settings -->
<AnchorPane pickOnBounds="false">
<fx:include fx:id="settingsInclude" source="gameuicomponents/Settings.fxml" GridPane.columnIndex="1"/>
</AnchorPane>
</AnchorPane>