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/Casinomainui.fxml
T
Jona Walpert 062e66cdf9 Feat: Add highscore popup UI and lobby display
Highscore button in GameUI replaces "Info" Button wich was unused
(Issue #110)
2026-04-21 20:13:13 +02:00

140 lines
6.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.geometry.Insets?>
<AnchorPane xmlns="http://javafx.com"
xmlns:fx="http://javafx.com"
fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.lobbyui.CasinomainuiController"
styleClass="anchor-pane-bg"
stylesheets="@Casinomainui.css">
<GridPane prefWidth="1200" prefHeight="800" AnchorPane.topAnchor="0" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0">
<columnConstraints>
<!-- The table takes up 70% of the window -->
<ColumnConstraints percentWidth="70.0" hgrow="ALWAYS" />
<!-- The info box takes up 25% of the window, including a 5% buffer -->
<ColumnConstraints percentWidth="5.0" hgrow="ALWAYS" />
<ColumnConstraints percentWidth="25.0" hgrow="ALWAYS" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="ALWAYS" />
</rowConstraints>
<children>
<!-- LEFT SIDE (Table) -->
<GridPane GridPane.columnIndex="0" style="-fx-background-color: transparent;" alignment="CENTER">
<rowConstraints>
<RowConstraints percentHeight="25.0" vgrow="ALWAYS" />
<RowConstraints percentHeight="75.0" vgrow="ALWAYS" />
</rowConstraints>
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" />
</columnConstraints>
<children>
<HBox alignment="CENTER" spacing="20"
maxWidth="Infinity"
GridPane.rowIndex="0"
GridPane.columnIndex="0"
GridPane.halignment="CENTER">
<ImageView fx:id="logoView"
fitHeight="96"
fitWidth="96"
preserveRatio="true" />
<VBox alignment="CENTER" spacing="5">
<Label text="placeholder text wird in controller ueberschriebeen"
styleClass="table-title"
fx:id="titleLabel"
alignment="CENTER" />
<Label text="placeholder text wird in controller ueberschriebeen"
styleClass="table-title"
fx:id="subtitleLabel"
alignment="CENTER" />
</VBox>
</HBox>
<Button text="EXIT"
styleClass="button-exit"
fx:id="exitbutton"
onAction="#handleexitbutton"
GridPane.rowIndex="0"
GridPane.columnIndex="0"
GridPane.halignment="LEFT"
GridPane.valignment="TOP">
<GridPane.margin>
<Insets top="20" left="20" />
</GridPane.margin>
</Button>
<Button text="CREATE A LOBBY"
styleClass="button-create-lobby"
fx:id="createLobbyButton"
onAction="#handleCreateLobbyButton"
GridPane.rowIndex="0"
GridPane.columnIndex="0"
GridPane.halignment="LEFT"
GridPane.valignment="TOP">
<GridPane.margin>
<Insets top="60" left="20" />
</GridPane.margin>
</Button>
<!-- Username input + change name, with highscores directly below -->
<VBox alignment="TOP_LEFT" spacing="10"
GridPane.rowIndex="0"
GridPane.columnIndex="0"
GridPane.halignment="LEFT"
GridPane.valignment="TOP">
<GridPane.margin>
<Insets top="140" left="20" />
</GridPane.margin>
<HBox alignment="CENTER_LEFT" spacing="10">
<TextField fx:id="usernameField"
promptText="Username"
styleClass="gray-input-field"
maxWidth="180" />
<Button text="Apply Name"
fx:id="loginButton"
onAction="#handleLoginButton"
styleClass="button-create-lobby" />
</HBox>
<Button text="HIGHSCORES"
styleClass="button-create-lobby"
fx:id="highscoreButton"
onAction="#handleOpenHighscores" />
</VBox>
<VBox fx:id="casinoTable"
alignment="CENTER"
styleClass="casino-table"
spacing="20"
maxWidth="Infinity"
maxHeight="Infinity"
GridPane.rowIndex="1"
GridPane.columnIndex="0"
GridPane.halignment="CENTER">
<GridPane.margin>
<Insets left="20" bottom="20" />
</GridPane.margin>
</VBox>
</children>
</GridPane>
<VBox GridPane.columnIndex="1"
alignment="CENTER"
minWidth="100"
minHeight="100">
<!-- Remains empty -->
</VBox>
<!-- RIGHT SIDE (Chat Box) -->
<AnchorPane fx:id="chatContainer" GridPane.columnIndex="2" />
</children>
</GridPane>
</AnchorPane>