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/gameuicomponents/Taskbar.fxml
T

93 lines
3.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.geometry.Insets?>
<!-- movable taskbar -->
<HBox xmlns="http://javafx.com/javafx/21"
xmlns:fx="http://javafx.com/fxml/1"
fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.gameuicomponents.TaskbarController"
fx:id="taskbar"
styleClass="taskbar"
spacing="15"
alignment="CENTER"
onMousePressed="#onTaskbarPressed"
onMouseDragged="#onTaskbarDragged"
onMouseReleased="#onTaskbarReleased"
layoutX="50.0" layoutY="710.0">
<!-- Placeholder buttons -->
<Button text="SETTINGS" onAction="#onSettingsButtonClick" styleClass="gray-button" />
<Button text="HIGHSCORE" onAction="#onHighscoreButtonClick" styleClass="gray-button" />
<!-- Help Button with Dropdown Menu -->
<MenuButton text="HELP" styleClass="gray-button">
<items>
<MenuItem text="SHOW TIPS" onAction="#onShowTipsButtonClick" />
<MenuItem text="CB: Manual" onAction="#onBrowserButtonClick" />
<MenuItem text="CB: Casono" onAction="#onBrowserButtonClickCasono" />
<MenuItem text="CB: Wikipedia" onAction="#onBrowserButtonClickWiki" />
<MenuItem text="CB: Brave Search" onAction="#onBrowserButtonClickBrave" />
<MenuItem text="CB: VS Code" onAction="#onBrowserButtonClickVSCode" />
</items>
</MenuButton>
<!-- Vertical dividing line: Creates a visual separation between two button areas -->
<Separator orientation="VERTICAL" prefHeight="20" opacity="0.3" />
<!-- Input field: Responds to the Enter key to confirm the entry -->
<TextField fx:id="taskbarInput"
promptText="Set amount..."
onKeyPressed="#onInputSubmitted"
styleClass="gray-input-field"
prefWidth="150" />
<!-- Confirmation button: Alternative to the Enter key to submit the entry -->
<Button text="BET"
fx:id="betButton"
onAction="#onInputSubmittedAction"
styleClass="yellow-button"/>
<!-- Action buttons: Trigger Call -->
<Button text="CALL"
fx:id="callButton"
onAction="#onInputPlayerCall"
styleClass="yellow-button"/>
<!-- Action buttons: Trigger Fold -->
<Button text="FOLD"
fx:id="foldButton"
onAction="#onInputPlayerFold"
styleClass="yellow-button"/>
<!-- Action buttons: Trigger Raise -->
<Button text="RAISE"
fx:id="raiseButton"
onAction="#onInputPlayerRaise"
styleClass="yellow-button"/>
<!-- Vertical dividing line: Creates a visual separation between two button areas -->
<Separator orientation="VERTICAL" prefHeight="20" opacity="0.3" />
<!-- Money display: Shows the player's current balance -->
<VBox alignment="CENTER" spacing="2">
<Label fx:id="moneyLabel"
text="20000$"
styleClass="money-value"/>
</VBox>
<Separator orientation="VERTICAL" prefHeight="20" opacity="0.3" />
<!-- Menu button: Cancels the current game and returns to the main menu -->
<Button text="LEAVE"
onAction="#onExitButtonClick"
styleClass="red-button"/>
<!-- Inner spacing: Keeps the content 10 pixels away from the top/bottom and 20 pixels from the sides -->
<padding>
<Insets top="10" right="20" bottom="10" left="20"/>
</padding>
</HBox>