Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Taiko Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Taiko Web
Commits
34d0bd01
Commit
34d0bd01
authored
Nov 27, 2019
by
Bui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SongSelect: category jumping
parent
7a50dec5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
10 deletions
+81
-10
public/assets/audio/se_jump.wav
public/assets/audio/se_jump.wav
+0
-0
public/src/js/assets.js
public/src/js/assets.js
+1
-0
public/src/js/songselect.js
public/src/js/songselect.js
+80
-10
No files found.
public/assets/audio/se_jump.wav
0 → 100644
View file @
34d0bd01
File added
public/src/js/assets.js
View file @
34d0bd01
...
@@ -90,6 +90,7 @@ var assets = {
...
@@ -90,6 +90,7 @@ var assets = {
"
se_don.wav
"
,
"
se_don.wav
"
,
"
se_ka.wav
"
,
"
se_ka.wav
"
,
"
se_pause.wav
"
,
"
se_pause.wav
"
,
"
se_jump.wav
"
,
"
v_combo_50_meka.wav
"
,
"
v_combo_50_meka.wav
"
,
"
v_combo_100_meka.wav
"
,
"
v_combo_100_meka.wav
"
,
...
...
public/src/js/songselect.js
View file @
34d0bd01
...
@@ -115,7 +115,8 @@ class SongSelect{
...
@@ -115,7 +115,8 @@ class SongSelect{
songSkin
:
song
.
song_skin
||
{},
songSkin
:
song
.
song_skin
||
{},
music
:
song
.
music
,
music
:
song
.
music
,
volume
:
song
.
volume
,
volume
:
song
.
volume
,
maker
:
song
.
maker
maker
:
song
.
maker
,
canJump
:
true
})
})
}
}
this
.
songs
.
sort
((
a
,
b
)
=>
{
this
.
songs
.
sort
((
a
,
b
)
=>
{
...
@@ -136,7 +137,8 @@ class SongSelect{
...
@@ -136,7 +137,8 @@ class SongSelect{
title
:
strings
.
randomSong
,
title
:
strings
.
randomSong
,
skin
:
this
.
songSkin
.
random
,
skin
:
this
.
songSkin
.
random
,
action
:
"
random
"
,
action
:
"
random
"
,
category
:
strings
.
random
category
:
strings
.
random
,
canJump
:
true
})
})
if
(
touchEnabled
){
if
(
touchEnabled
){
if
(
fromTutorial
===
"
tutorial
"
){
if
(
fromTutorial
===
"
tutorial
"
){
...
@@ -279,7 +281,8 @@ class SongSelect{
...
@@ -279,7 +281,8 @@ class SongSelect{
locked
:
true
,
locked
:
true
,
hasPointer
:
false
,
hasPointer
:
false
,
options
:
0
,
options
:
0
,
selLock
:
false
selLock
:
false
,
catJump
:
false
}
}
this
.
songSelecting
=
{
this
.
songSelecting
=
{
speed
:
800
,
speed
:
800
,
...
@@ -304,13 +307,15 @@ class SongSelect{
...
@@ -304,13 +307,15 @@ class SongSelect{
this
.
gamepad
=
new
Gamepad
({
this
.
gamepad
=
new
Gamepad
({
confirm
:
[
"
b
"
,
"
start
"
,
"
ls
"
,
"
rs
"
],
confirm
:
[
"
b
"
,
"
start
"
,
"
ls
"
,
"
rs
"
],
back
:
[
"
a
"
],
back
:
[
"
a
"
],
left
:
[
"
l
"
,
"
l
b
"
,
"
lt
"
,
"
l
sl
"
],
left
:
[
"
l
"
,
"
lsl
"
],
right
:
[
"
r
"
,
"
rb
"
,
"
rt
"
,
"
lsr
"
],
right
:
[
"
r
"
,
"
lsr
"
],
up
:
[
"
u
"
,
"
lsu
"
],
up
:
[
"
u
"
,
"
lsu
"
],
down
:
[
"
d
"
,
"
lsd
"
],
down
:
[
"
d
"
,
"
lsd
"
],
session
:
[
"
back
"
],
session
:
[
"
back
"
],
ctrl
:
[
"
y
"
],
ctrl
:
[
"
y
"
],
shift
:
[
"
x
"
]
shift
:
[
"
x
"
],
jump_left
:
[
"
lb
"
,
"
lt
"
],
jump_right
:
[
"
rb
"
,
"
rt
"
]
},
this
.
keyPress
.
bind
(
this
))
},
this
.
keyPress
.
bind
(
this
))
if
(
!
assets
.
customSongs
){
if
(
!
assets
.
customSongs
){
...
@@ -362,9 +367,21 @@ class SongSelect{
...
@@ -362,9 +367,21 @@ class SongSelect{
}
else
if
(
name
===
"
session
"
){
}
else
if
(
name
===
"
session
"
){
this
.
toSession
()
this
.
toSession
()
}
else
if
(
name
===
"
left
"
){
}
else
if
(
name
===
"
left
"
){
this
.
moveToSong
(
-
1
)
if
(
this
.
pressedKeys
[
"
shift
"
]){
this
.
categoryJump
(
-
1
)
}
else
{
this
.
moveToSong
(
-
1
)
}
}
else
if
(
name
===
"
right
"
){
}
else
if
(
name
===
"
right
"
){
this
.
moveToSong
(
1
)
if
(
this
.
pressedKeys
[
"
shift
"
]){
this
.
categoryJump
(
1
)
}
else
{
this
.
moveToSong
(
1
)
}
}
else
if
(
name
===
"
jump_left
"
){
this
.
categoryJump
(
-
1
)
}
else
if
(
name
===
"
jump_right
"
){
this
.
categoryJump
(
1
)
}
}
}
else
if
(
this
.
state
.
screen
===
"
difficulty
"
){
}
else
if
(
this
.
state
.
screen
===
"
difficulty
"
){
if
(
name
===
"
confirm
"
){
if
(
name
===
"
confirm
"
){
...
@@ -569,6 +586,16 @@ class SongSelect{
...
@@ -569,6 +586,16 @@ class SongSelect{
this
.
pointer
(
false
)
this
.
pointer
(
false
)
}
}
}
}
categoryJump
(
moveBy
){
this
.
state
.
catJump
=
true
this
.
state
.
move
=
moveBy
;
this
.
state
.
locked
=
1
this
.
endPreview
()
assets
.
sounds
[
"
se_jump
"
].
play
()
}
moveToDiff
(
moveBy
){
moveToDiff
(
moveBy
){
if
(
this
.
state
.
locked
!==
1
){
if
(
this
.
state
.
locked
!==
1
){
this
.
state
.
move
=
moveBy
this
.
state
.
move
=
moveBy
...
@@ -984,9 +1011,52 @@ class SongSelect{
...
@@ -984,9 +1011,52 @@ class SongSelect{
var
scroll
=
resize2
-
resize
-
scrollDelay
*
2
var
scroll
=
resize2
-
resize
-
scrollDelay
*
2
var
elapsed
=
ms
-
this
.
state
.
moveMS
var
elapsed
=
ms
-
this
.
state
.
moveMS
if
(
this
.
state
.
move
&&
ms
>
this
.
state
.
moveMS
+
resize2
-
scrollDelay
){
if
(
this
.
state
.
move
&&
ms
>
this
.
state
.
moveMS
+
resize2
-
scrollDelay
){
assets
.
sounds
[
"
se_ka
"
].
play
()
var
isJump
=
this
.
state
.
catJump
var
previousSelectedSong
=
this
.
selectedSong
var
previousSelectedSong
=
this
.
selectedSong
this
.
selectedSong
=
this
.
mod
(
this
.
songs
.
length
,
this
.
selectedSong
+
this
.
state
.
move
)
if
(
!
isJump
){
assets
.
sounds
[
"
se_ka
"
].
play
()
this
.
selectedSong
=
this
.
mod
(
this
.
songs
.
length
,
this
.
selectedSong
+
this
.
state
.
move
)
}
else
{
var
currentCat
=
this
.
songs
[
this
.
selectedSong
].
category
var
currentIdx
=
this
.
mod
(
this
.
songs
.
length
,
this
.
selectedSong
)
if
(
this
.
state
.
move
>
0
){
var
nextSong
=
this
.
songs
.
find
(
song
=>
this
.
mod
(
this
.
songs
.
length
,
this
.
songs
.
indexOf
(
song
))
>
currentIdx
&&
song
.
category
!==
currentCat
&&
song
.
canJump
)
if
(
!
nextSong
){
nextSong
=
this
.
songs
[
0
]
}
}
else
{
var
isFirstInCat
=
this
.
songs
.
findIndex
(
song
=>
song
.
category
===
currentCat
)
==
this
.
selectedSong
if
(
!
isFirstInCat
){
var
nextSong
=
this
.
songs
.
find
(
song
=>
this
.
mod
(
this
.
songs
.
length
,
this
.
songs
.
indexOf
(
song
))
<
currentIdx
&&
song
.
category
===
currentCat
&&
song
.
canJump
)
}
else
{
var
idx
=
this
.
songs
.
length
-
1
var
nextSong
var
lastCat
for
(;
idx
>=
0
;
idx
--
){
if
(
this
.
songs
[
idx
].
category
!==
lastCat
&&
this
.
songs
[
idx
].
action
!==
"
back
"
){
lastCat
=
this
.
songs
[
idx
].
category
if
(
nextSong
){
break
}
}
if
(
lastCat
!==
currentCat
&&
idx
<
currentIdx
){
nextSong
=
idx
}
}
nextSong
=
this
.
songs
[
nextSong
]
}
if
(
!
nextSong
){
var
rev
=
[...
this
.
songs
].
reverse
()
nextSong
=
rev
.
find
(
song
=>
song
.
canJump
)
}
}
this
.
selectedSong
=
this
.
songs
.
indexOf
(
nextSong
)
this
.
state
.
catJump
=
false
}
if
(
previousSelectedSong
!==
this
.
selectedSong
){
if
(
previousSelectedSong
!==
this
.
selectedSong
){
pageEvents
.
send
(
"
song-select-move
"
,
this
.
songs
[
this
.
selectedSong
])
pageEvents
.
send
(
"
song-select-move
"
,
this
.
songs
[
this
.
selectedSong
])
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment