Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BattleArena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Scherbaum Maximilian
BattleArena
Commits
f8b93493
Commit
f8b93493
authored
1 year ago
by
Tran Peter
Browse files
Options
Downloads
Patches
Plain Diff
fix(intro): fix keyboard buttons not working for skipping
parent
1a05eea0
No related branches found
Branches containing commit
Tags
v0.2.0
Tags containing commit
5 merge requests
!74
V1
,
!73
Initial commit
,
!71
Merge DataBase into Development
,
!32
Merge ui into development
,
!28
merge ui in developmentWorking
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/de/hdm_stuttgart/battlearena/Controller/IntroController.java
+10
-2
10 additions, 2 deletions
...hdm_stuttgart/battlearena/Controller/IntroController.java
src/main/resources/videos/black.mp4
+0
-0
0 additions, 0 deletions
src/main/resources/videos/black.mp4
with
10 additions
and
2 deletions
src/main/java/de/hdm_stuttgart/battlearena/Controller/IntroController.java
+
10
−
2
View file @
f8b93493
...
...
@@ -26,7 +26,7 @@ public class IntroController implements Initializable {
private
BorderPane
introParent
;
private
final
String
fileName
=
"src/main/resources/videos/"
;
// nextVideo() will iterate through this array so the next video will be played TODO: change the videos to non memes lmao
private
final
String
[]
videos
=
{
"sony.mp4"
,
"monke.mp4"
};
private
final
String
[]
videos
=
{
"black.mp4"
,
"sony.mp4"
,
"monke.mp4"
};
private
File
file
=
new
File
(
fileName
+
videos
[
0
]);
private
int
counter
=
0
;
private
MediaPlayer
mediaPlayer
;
...
...
@@ -38,6 +38,7 @@ public class IntroController implements Initializable {
introParent
.
setStyle
(
"-fx-background-color: black;"
);
introParent
.
setCursor
(
Cursor
.
NONE
);
createMediaPlayer
();
mediaPlayer
.
setOnReady
(()
->
introParent
.
requestFocus
());
}
private
void
createMediaPlayer
()
{
...
...
@@ -53,7 +54,14 @@ public class IntroController implements Initializable {
}
});
// TODO: make any button pressed work
introParent
.
setOnKeyPressed
((
keyEvent
->
{
if
(
counter
==
videos
.
length
-
1
)
{
videoEnd
();
}
else
{
nextVideo
();
}
}));
introParent
.
setOnMouseClicked
((
mouseEvent
)
->
{
if
(
counter
==
videos
.
length
-
1
)
{
videoEnd
();
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/videos/black.mp4
0 → 100644
+
0
−
0
View file @
f8b93493
File added
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