Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
projectSnake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jerusalem Laila
projectSnake
Commits
23c728b9
Commit
23c728b9
authored
1 year ago
by
Barth Carolin
Browse files
Options
Downloads
Patches
Plain Diff
Able to change Scenes between Start and Options now
parent
68dbc7e7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/example/StartScreen/StartScreen.java
+2
-4
2 additions, 4 deletions
src/main/java/org/example/StartScreen/StartScreen.java
src/main/java/org/example/StartScreen/StartScreenController.java
+1
-1
1 addition, 1 deletion
...n/java/org/example/StartScreen/StartScreenController.java
with
3 additions
and
5 deletions
src/main/java/org/example/StartScreen/StartScreen.java
+
2
−
4
View file @
23c728b9
...
...
@@ -57,16 +57,14 @@ public class StartScreen extends Application {
stages
=
stage
;
stage
.
setResizable
(
false
);
stage
.
setTitle
(
"Snake Game"
);
changeScene
(
"/fxml/
welcomeScene
.fxml"
,
"/styles/styles.css"
);
changeScene
(
"/fxml/
start
.fxml"
,
"/styles/styles.css"
);
log
.
info
(
"Application started"
);
// Image icon= new Image(new FileInputStream("src/main/res
s
ources/images...png")); Icon screen
// Image icon= new Image(new FileInputStream("src/main/resources/images...png")); Icon screen
//stage.getIcons().add(icon); Icon screen
stage
.
show
();
}
@FXML
public
void
openOptions
()
{
log
.
info
(
"Clicked :)"
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/example/StartScreen/StartScreenController.java
+
1
−
1
View file @
23c728b9
...
...
@@ -5,6 +5,6 @@ import javafx.event.ActionEvent;
public
class
StartScreenController
{
public
void
openOptions
(
ActionEvent
actionEvent
)
{
StartScreen
.
changeScene
(
"fxml/OptionsScreen.fxml"
,
"styles/styles.css"
);
StartScreen
.
changeScene
(
"
/
fxml/OptionsScreen.fxml"
,
"
/
styles/styles.css"
);
}
}
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