Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Mathdoku
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tmp1u19
Mathdoku
Commits
fb21531b
Commit
fb21531b
authored
5 years ago
by
tmp1u19
Browse files
Options
Downloads
Patches
Plain Diff
Class which creates the scene of the game
parent
87a5cd0f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GameScene.java
+65
-0
65 additions, 0 deletions
GameScene.java
with
65 additions
and
0 deletions
GameScene.java
0 → 100644
+
65
−
0
View file @
fb21531b
import
javafx.application.Application
;
import
javafx.geometry.Insets
;
import
javafx.geometry.Pos
;
import
javafx.scene.Scene
;
import
javafx.scene.control.*
;
import
javafx.scene.layout.*
;
import
javafx.stage.Stage
;
import
javafx.stage.StageStyle
;
public
class
GameScene
extends
Application
{
private
Handler
handler
=
new
Handler
();
@Override
public
void
start
(
Stage
stage
)
{
VBox
root
=
new
VBox
(
5
);
root
.
setAlignment
(
Pos
.
CENTER
);
root
.
setPadding
(
new
Insets
(
20
));
HBox
buttons
=
new
HBox
();
buttons
.
setAlignment
(
Pos
.
CENTER
);
GridPane
grid
=
new
GridPane
();
grid
.
setAlignment
(
Pos
.
CENTER
);
grid
.
setPadding
(
new
Insets
(
20
));
Button
undo
=
new
Button
(
"Undo"
);
Button
redo
=
new
Button
(
"Redo"
);
Button
help
=
new
Button
(
"Enable Help"
);
Button
clear
=
new
Button
(
"Clear"
);
Button
fileLoad
=
new
Button
(
"File"
);
Button
textLoad
=
new
Button
(
"Text"
);
handler
.
helpButton
(
help
,
grid
);
handler
.
clearBoard
(
clear
,
grid
);
buttons
.
getChildren
().
addAll
(
undo
,
redo
,
help
,
clear
,
fileLoad
,
textLoad
);
handler
.
draw
(
grid
);
Label
note
=
new
Label
(
"Double click the space provided for text in cell"
);
Button
submit
=
new
Button
(
"Submit"
);
handler
.
submitButton
(
submit
);
root
.
getChildren
().
addAll
(
buttons
,
grid
,
note
,
submit
);
Scene
scene
=
new
Scene
(
root
);
stage
.
setScene
(
scene
);
stage
.
setTitle
(
"Mathdoku"
);
stage
.
initStyle
(
StageStyle
.
DECORATED
);
stage
.
setX
(
750
);
stage
.
setY
(
300
);
stage
.
setMinHeight
(
600
);
stage
.
setMinWidth
(
500
);
stage
.
show
();
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment