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