hanze/game-client

src/main/resources/nl/isygameclient/views/games/tictactoe/TicTacToeSinglePlayer.fxml in tournament
Repositories | Summary | Log | Files

TicTacToeSinglePlayer.fxml (8683B) download


  1<?xml version="1.0" encoding="UTF-8"?>
  2
  3<?import com.jfoenix.controls.*?>
  4<?import javafx.geometry.*?>
  5<?import javafx.scene.control.*?>
  6<?import javafx.scene.layout.*?>
  7<?import java.lang.*?>
  8<BorderPane stylesheets="@../../../css/theme.css" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1"
  9            fx:controller="nl.isygameclient.controllers.games.tictactoe.TicTacToeSinglePlayerController">
 10    <styleClass>
 11        <String fx:value="surface"/>
 12    </styleClass>
 13    <left>
 14        <VBox prefWidth="200" styleClass="surface-variant" spacing="20" >
 15            <padding>
 16                <Insets topRightBottomLeft="20"/>
 17            </padding>
 18
 19<!--            &lt;!&ndash; Difficulty Controls &ndash;&gt;-->
 20<!--            <VBox>-->
 21<!--                <Label text="Difficulty">-->
 22<!--                    <styleClass>-->
 23<!--                        <String fx:value="headline-small"/>-->
 24<!--                        <String fx:value="on-surface-variant-text"/>-->
 25<!--                    </styleClass>-->
 26<!--                </Label>-->
 27<!--                <Separator styleClass="on-surface-variant-text"/>-->
 28<!--                <JFXComboBox fx:id="difficultyCombo" prefWidth="Infinity" onAction="#onDifficultyComboSelect">-->
 29<!--                    <styleClass>-->
 30<!--                        <String fx:value="primary"/>-->
 31<!--                        <String fx:value="on-primary-text"/>-->
 32<!--                        <String fx:value="body-large"/>-->
 33<!--                    </styleClass>-->
 34<!--                </JFXComboBox>-->
 35<!--            </VBox>-->
 36
 37<!--            &lt;!&ndash; Playing As Controls &ndash;&gt;-->
 38<!--            <VBox>-->
 39<!--                <Label text="Playing As">-->
 40<!--                    <styleClass>-->
 41<!--                        <String fx:value="headline-small"/>-->
 42<!--                        <String fx:value="on-surface-variant-text"/>-->
 43<!--                    </styleClass>-->
 44<!--                </Label>-->
 45<!--                <Separator styleClass="on-surface-variant-text"/>-->
 46<!--                <JFXComboBox fx:id="playingAsCombo" prefWidth="Infinity" onAction="#onPlayingAsComboSelect">-->
 47<!--                    <styleClass>-->
 48<!--                        <String fx:value="primary"/>&ndash;&gt;-->
 49<!--                        <String fx:value="on-primary-text"/>-->
 50<!--                        <String fx:value="body-large"/>-->
 51<!--                    </styleClass>-->
 52<!--                </JFXComboBox>-->
 53<!--            </VBox>-->
 54
 55<!--            &lt;!&ndash; Opponents Controls &ndash;&gt;-->
 56<!--            <VBox>-->
 57<!--                <Label text="Opponent">-->
 58<!--                    <styleClass>-->
 59<!--                        <String fx:value="headline-small"/>-->
 60<!--                        <String fx:value="on-surface-variant-text"/>-->
 61<!--                    </styleClass>-->
 62<!--                </Label>-->
 63<!--                <Separator styleClass="on-surface-variant-text"/>-->
 64<!--                <JFXComboBox fx:id="opponentCombo" prefWidth="Infinity" onAction="#onOpponentComboSelect">-->
 65<!--                    <styleClass>-->
 66<!--                        <String fx:value="primary"/>&ndash;&gt;-->
 67<!--                        <String fx:value="on-primary-text"/>-->
 68<!--                        <String fx:value="body-large"/>-->
 69<!--                    </styleClass>-->
 70<!--                </JFXComboBox>-->
 71<!--            </VBox>-->
 72
 73<!--            &lt;!&ndash; Best of Controls &ndash;&gt;-->
 74<!--            <VBox>-->
 75<!--                <Label text="Best Of">-->
 76<!--                    <styleClass>-->
 77<!--                        <String fx:value="headline-small"/>-->
 78<!--                        <String fx:value="on-surface-variant-text"/>-->
 79<!--                    </styleClass>-->
 80<!--                </Label>-->
 81<!--                <Separator styleClass="on-surface-variant-text"/>-->
 82<!--            </VBox>-->
 83
 84            <!-- Window Controls -->
 85            <Pane VBox.vgrow="ALWAYS"/>
 86            <VBox spacing="10" alignment="CENTER">
 87                <JFXButton text="New Game" onAction="#onNewGameButtonClick" prefWidth="Infinity">
 88                    <styleClass>
 89                        <String fx:value="primary"/>
 90                        <String fx:value="on-primary-text"/>
 91                        <String fx:value="title-medium"/>
 92                    </styleClass>
 93                </JFXButton>
 94                <JFXButton text="Main Menu" onAction="#onMainMenuButtonClick" prefWidth="Infinity">
 95                    <styleClass>
 96                        <String fx:value="primary"/>
 97                        <String fx:value="on-primary-text"/>
 98                        <String fx:value="title-medium"/>
 99                    </styleClass>
100                </JFXButton>
101                <JFXButton text="Exit" onAction="#onExitButtonClick" prefWidth="Infinity">
102                    <styleClass>
103                        <String fx:value="primary"/>
104                        <String fx:value="on-primary-text"/>
105                        <String fx:value="title-medium"/>
106                    </styleClass>
107                </JFXButton>
108            </VBox>
109        </VBox>
110    </left>
111    <!--  Game Field  -->
112    <center>
113        <HBox alignment="CENTER">
114            <padding>
115                <Insets topRightBottomLeft="20"/>
116            </padding>
117
118            <!-- Left -->
119            <VBox minWidth="150" maxHeight="800" alignment="TOP_CENTER">
120                <Label text="Score Player">
121                    <styleClass>
122                        <String fx:value="headline-medium"/>
123                        <String fx:value="on-surface-text"/>
124                    </styleClass>
125                </Label>
126                <Label text="0">
127                    <styleClass>
128                        <String fx:value="headline-medium"/>
129                        <String fx:value="on-surface-text"/>
130                    </styleClass>
131                </Label>
132                <Separator maxWidth="100"/>
133            </VBox>
134
135            <!-- Center -->
136            <VBox alignment="CENTER" minWidth="640">
137                <HBox alignment="CENTER">
138                    <padding>
139                        <Insets topRightBottomLeft="5"/>
140                    </padding>
141                    <Label text="Current Player: ">
142                        <styleClass>
143                            <String fx:value="on-surface-text"/>
144                            <String fx:value="headline-small"/>
145                        </styleClass>
146                    </Label>
147                    <Label fx:id="currentPlayer">
148                        <styleClass>
149                            <String fx:value="on-surface-text"/>
150                            <String fx:value="headline-small"/>
151                        </styleClass>
152                    </Label>
153                </HBox>
154                <Separator maxWidth="100"/>
155
156                <StackPane>
157                    <VBox.margin>
158                        <Insets left="20" right="20" top="20"/>
159                    </VBox.margin>
160                    <GridPane fx:id="grid" styleClass="ttt-grid" vgap="10" hgap="10" maxWidth="640" maxHeight="640">
161                        <padding>
162                            <Insets topRightBottomLeft="10"/>
163                        </padding>
164                    </GridPane>
165                        <Label fx:id="gameOverText" visible="false">
166                            <padding>
167                                <Insets top="10" bottom="10" left="20" right="20"/>
168                            </padding>
169                            <styleClass>
170                                <String fx:value="surface"/>
171                                <String fx:value="display-large"/>
172                                <String fx:value="on-surface-text"/>
173                            </styleClass>
174                        </Label>
175                </StackPane>
176            </VBox>
177
178            <!-- Right -->
179            <VBox minWidth="150" maxHeight="800" alignment="TOP_CENTER">
180                <Label text="Score Opponent">
181                    <styleClass>
182                        <String fx:value="headline-medium"/>
183                        <String fx:value="on-surface-text"/>
184                    </styleClass>
185                </Label>
186                <Label text="0">
187                    <styleClass>
188                        <String fx:value="headline-medium"/>
189                        <String fx:value="on-surface-text"/>
190                    </styleClass>
191                </Label>
192                <Separator maxWidth="100"/>
193            </VBox>
194        </HBox>
195    </center>
196</BorderPane>