<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>

<BorderPane fx:id="menuPanel" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="519.0" prefWidth="830.0" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1" fx:controller="lab.MainScreenController">
   <top>
      <HBox prefWidth="200.0" BorderPane.alignment="CENTER">
         <children>
            <Label text="Player name:" />
            <TextField fx:id="name" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" promptText="type  player name like Java Duke" HBox.hgrow="ALWAYS" />
         </children>
      </HBox>
   </top>
   <bottom>
      <Button fx:id="playButton" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#play" text="Play" BorderPane.alignment="CENTER">
         <font>
            <Font name="System Bold" size="51.0" />
         </font></Button>
   </bottom>
   <center>
      <VBox prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
         <children>
            <HBox prefHeight="100.0" prefWidth="200.0">
               <children>
                  <RadioButton fx:id="easy" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" styleClass="difficultButton" text="Easy" HBox.hgrow="ALWAYS">
                     <toggleGroup>
                        <ToggleGroup fx:id="difficult" />
                     </toggleGroup>
                     <HBox.margin>
                        <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
                     </HBox.margin>
                  </RadioButton>
                  <RadioButton fx:id="medium" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" selected="true" styleClass="difficultButton" text="Medium" toggleGroup="$difficult" HBox.hgrow="ALWAYS">
                     <HBox.margin>
                        <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
                     </HBox.margin>
                  </RadioButton>
                  <RadioButton fx:id="hard" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" styleClass="difficultButton" text="Hard" toggleGroup="$difficult" HBox.hgrow="ALWAYS">
                     <HBox.margin>
                        <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
                     </HBox.margin>
                  </RadioButton>
               </children>
            </HBox>
            <VBox>
               <children>
                  <TableView fx:id="scores" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="2000.0">
                    <columns>
                      <TableColumn fx:id="nickColumn" prefWidth="75.0" text="Nick" />
                      <TableColumn fx:id="pointsColumn" prefWidth="75.0" text="Points" />
                    </columns>
                     <columnResizePolicy>
                        <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
                     </columnResizePolicy>
                  </TableView>
                  <Button fx:id="btnGenerateScore" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#btnGenerateScoreAction" text="Generate new score" />
                  <Button fx:id="btnLoadAll" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#btnLoadAllAction" text="Load all from DB" />
                  <Button fx:id="btnLoadFirstTen" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#btnLoadFirstTenAction" text="Load first 10 from DB" />
               </children>
            </VBox>
         </children>
      </VBox>
   </center>
</BorderPane>