Skip to content
Snippets Groups Projects
gameWindow.fxml 2.35 KiB
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.canvas.Canvas?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Slider?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.text.Font?>

<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="459.0" prefWidth="824.0" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1" fx:controller="lab.GameController">
   <bottom>
      <HBox alignment="TOP_CENTER" prefHeight="66.0" prefWidth="824.0" BorderPane.alignment="CENTER">
         <children>
            <Slider fx:id="speed" majorTickUnit="15.0" max="350.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" min="20.0" minorTickCount="5" prefHeight="116.0" prefWidth="717.0" showTickLabels="true" showTickMarks="true" style="-fx-background-image: url('LochNess.gif');" HBox.hgrow="ALWAYS" />
            <Button fx:id="changeButton" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#changePosition" prefHeight="54.0" prefWidth="99.0" text="Change position" textAlignment="CENTER" textFill="#cf4700" textOverrun="CLIP" wrapText="true">
               <font>
                  <Font name="System Bold" size="15.0" />
               </font>
               <cursor>
                  <Cursor fx:constant="CROSSHAIR" />
               </cursor>
               <opaqueInsets>
                  <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
               </opaqueInsets>
               <HBox.margin>
                  <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
               </HBox.margin>
            </Button>
         </children>
      </HBox>
   </bottom>
   <center>
      <Canvas fx:id="canvas" height="340.0" width="749.0" BorderPane.alignment="CENTER">
         <BorderPane.margin>
            <Insets />
         </BorderPane.margin>
      </Canvas>
   </center>
   <left>
      <Slider fx:id="boatPosition" blockIncrement="5.0" majorTickUnit="10.0" max="80.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" min="20.0" minorTickCount="5" orientation="VERTICAL" prefHeight="331.0" prefWidth="38.0" showTickLabels="true" showTickMarks="true" BorderPane.alignment="CENTER" />
   </left>
</BorderPane>