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
d28a607c
Commit
d28a607c
authored
Jan 22, 2019
by
Bui
Committed by
GitHub
Jan 22, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #122 from LoveEevee/titlescreen-add-language-menu
Titlescreen: Add language selection menu
parents
016bfaf2
6fd37985
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
628 additions
and
153 deletions
+628
-153
public/src/css/loader.css
public/src/css/loader.css
+0
-1
public/src/css/titlescreen.css
public/src/css/titlescreen.css
+46
-1
public/src/js/assets.js
public/src/js/assets.js
+1
-5
public/src/js/canvasdraw.js
public/src/js/canvasdraw.js
+113
-36
public/src/js/main.js
public/src/js/main.js
+2
-1
public/src/js/parseosu.js
public/src/js/parseosu.js
+2
-2
public/src/js/scoresheet.js
public/src/js/scoresheet.js
+39
-19
public/src/js/songselect.js
public/src/js/songselect.js
+16
-11
public/src/js/strings.js
public/src/js/strings.js
+310
-53
public/src/js/titlescreen.js
public/src/js/titlescreen.js
+61
-3
public/src/js/view.js
public/src/js/view.js
+33
-21
public/src/views/titlescreen.html
public/src/views/titlescreen.html
+5
-0
No files found.
public/src/css/loader.css
View file @
d28a607c
...
@@ -17,7 +17,6 @@ body{
...
@@ -17,7 +17,6 @@ body{
background-color
:
#000
;
background-color
:
#000
;
background-position
:
top
center
;
background-position
:
top
center
;
background-size
:
30vh
;
background-size
:
30vh
;
font-family
:
TnT
,
Meiryo
,
sans-serif
;
}
}
#screen
.pattern-bg
{
#screen
.pattern-bg
{
background-color
:
#fe7839
;
background-color
:
#fe7839
;
...
...
public/src/css/titlescreen.css
View file @
d28a607c
...
@@ -41,5 +41,50 @@
...
@@ -41,5 +41,50 @@
.click-to-continue
::before
{
.click-to-continue
::before
{
-webkit-text-stroke
:
0.25em
#f00
;
-webkit-text-stroke
:
0.25em
#f00
;
filter
:
blur
(
0.3vmin
);
filter
:
blur
(
0.3vmin
);
left
:
auto
;
}
#lang
{
font-size
:
3vmin
;
position
:
absolute
;
bottom
:
0
;
left
:
0
;
width
:
7em
;
height
:
4em
;
color
:
#000
;
}
#lang
:focus-within
{
outline
:
#4d90fe
auto
5px
;
}
#lang-dropdown
{
font-size
:
1.7em
;
font-family
:
Microsoft
YaHei
,
sans-serif
;
opacity
:
0
;
width
:
100%
;
height
:
100%
;
color
:
#000
;
cursor
:
pointer
;
}
#lang-id
{
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
2.6em
;
font-family
:
TnT
,
Meiryo
,
sans-serif
;
font-size
:
1.5em
;
font-weight
:
normal
;
color
:
#fff
;
line-height
:
2.75em
;
z-index
:
0
;
}
#lang-icon
{
position
:
absolute
;
width
:
2.8em
;
height
:
2.8em
;
padding
:
0.6em
;
fill
:
currentColor
;
}
#lang
:hover
#lang-icon
{
color
:
#f00
;
}
#lang
:hover
#lang-id
::before
{
-webkit-text-stroke
:
0.25em
#f00
;
}
}
public/src/js/assets.js
View file @
d28a607c
...
@@ -48,11 +48,7 @@ var assets = {
...
@@ -48,11 +48,7 @@ var assets = {
"
taiko.png
"
,
"
taiko.png
"
,
"
dancing-don.gif
"
,
"
dancing-don.gif
"
,
"
bg-pattern-1.png
"
,
"
bg-pattern-1.png
"
,
"
muzu_easy.png
"
,
"
difficulty.png
"
,
"
muzu_normal.png
"
,
"
muzu_hard.png
"
,
"
muzu_oni.png
"
,
"
muzu_ura.png
"
,
"
don_anim_normal.png
"
,
"
don_anim_normal.png
"
,
"
don_anim_10combo.png
"
,
"
don_anim_10combo.png
"
,
"
don_anim_gogo.png
"
,
"
don_anim_gogo.png
"
,
...
...
public/src/js/canvasdraw.js
View file @
d28a607c
...
@@ -285,6 +285,7 @@
...
@@ -285,6 +285,7 @@
inputText
=
inputText
.
slice
(
0
,
matches
.
index
)
inputText
=
inputText
.
slice
(
0
,
matches
.
index
)
ura
=
matches
[
0
]
ura
=
matches
[
0
]
}
}
var
bold
=
this
.
bold
(
config
.
fontFamily
)
var
string
=
inputText
.
split
(
""
)
var
string
=
inputText
.
split
(
""
)
var
drawn
=
[]
var
drawn
=
[]
...
@@ -296,30 +297,56 @@
...
@@ -296,30 +297,56 @@
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
0
,
h
:
18
})
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
0
,
h
:
18
})
}
else
if
(
symbol
===
"
ー
"
){
}
else
if
(
symbol
===
"
ー
"
){
// Long-vowel mark
// Long-vowel mark
drawn
.
push
({
realText
:
symbol
,
svg
:
this
.
longVowelMark
,
x
:
-
4
,
y
:
5
,
h
:
33
,
scale
:
[
mul
,
mul
]})
if
(
bold
){
drawn
.
push
({
text
:
symbol
,
x
:
-
1
,
y
:
-
1
,
h
:
33
,
rotate
:
true
})
}
else
{
drawn
.
push
({
realText
:
symbol
,
svg
:
this
.
longVowelMark
,
x
:
-
4
,
y
:
5
,
h
:
33
,
scale
:
[
mul
,
mul
]})
}
}
else
if
(
symbol
===
"
∀
"
){
}
else
if
(
symbol
===
"
∀
"
){
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
0
,
h
:
39
,
rotate
:
true
})
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
0
,
h
:
39
,
rotate
:
true
})
}
else
if
(
symbol
===
"
↓
"
){
}
else
if
(
symbol
===
"
↓
"
){
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
12
,
h
:
45
})
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
12
,
h
:
45
})
}
else
if
(
symbol
===
"
.
"
){
}
else
if
(
symbol
===
"
.
"
){
drawn
.
push
({
realText
:
symbol
,
text
:
"
.
"
,
x
:
13
,
y
:
-
7
,
h
:
15
,
scale
:
[
1.2
,
0.7
]})
if
(
bold
){
drawn
.
push
({
realText
:
symbol
,
text
:
"
.
"
,
x
:
13
,
y
:
-
15
,
h
:
15
})
}
else
{
drawn
.
push
({
realText
:
symbol
,
text
:
"
.
"
,
x
:
13
,
y
:
-
7
,
h
:
15
,
scale
:
[
1.2
,
0.7
]})
}
}
else
if
(
symbol
===
"
…
"
){
}
else
if
(
symbol
===
"
…
"
){
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
5
,
h
:
25
,
rotate
:
true
})
drawn
.
push
({
text
:
symbol
,
x
:
bold
?
9
:
0
,
y
:
5
,
h
:
25
,
rotate
:
true
})
}
else
if
(
symbol
===
'
"
'
){
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
5
,
h
:
20
,
rotate
:
true
})
}
else
if
(
r
.
comma
.
test
(
symbol
)){
}
else
if
(
r
.
comma
.
test
(
symbol
)){
// Comma, full stop
// Comma, full stop
drawn
.
push
({
text
:
symbol
,
x
:
13
,
y
:
-
7
,
h
:
15
,
scale
:
[
1.2
,
0.7
]})
if
(
bold
){
drawn
.
push
({
text
:
symbol
,
x
:
13
,
y
:
-
15
,
h
:
15
})
}
else
{
drawn
.
push
({
text
:
symbol
,
x
:
13
,
y
:
-
7
,
h
:
15
,
scale
:
[
1.2
,
0.7
]})
}
}
else
if
(
r
.
ideographicComma
.
test
(
symbol
)){
}
else
if
(
r
.
ideographicComma
.
test
(
symbol
)){
// Ideographic comma, full stop
// Ideographic comma, full stop
drawn
.
push
({
text
:
symbol
,
x
:
16
,
y
:
-
16
,
h
:
18
})
drawn
.
push
({
text
:
symbol
,
x
:
16
,
y
:
-
16
,
h
:
18
})
}
else
if
(
r
.
apostrophe
.
test
(
symbol
)){
}
else
if
(
r
.
apostrophe
.
test
(
symbol
)){
// Apostrophe
// Apostrophe
drawn
.
push
({
realText
:
symbol
,
text
:
"
,
"
,
x
:
20
,
y
:
-
39
,
h
:
0
,
scale
:
[
1.2
,
0.7
]})
if
(
bold
){
drawn
.
push
({
text
:
symbol
,
x
:
20
,
y
:
-
25
,
h
:
0
})
}
else
{
drawn
.
push
({
realText
:
symbol
,
text
:
"
,
"
,
x
:
20
,
y
:
-
39
,
h
:
0
,
scale
:
[
1.2
,
0.7
]})
}
}
else
if
(
r
.
degree
.
test
(
symbol
)){
}
else
if
(
r
.
degree
.
test
(
symbol
)){
// Degree
// Degree
drawn
.
push
({
text
:
symbol
,
x
:
16
,
y
:
3
,
h
:
18
})
if
(
bold
){
drawn
.
push
({
text
:
symbol
,
x
:
16
,
y
:
9
,
h
:
25
})
}
else
{
drawn
.
push
({
text
:
symbol
,
x
:
16
,
y
:
3
,
h
:
18
})
}
}
else
if
(
r
.
brackets
.
test
(
symbol
)){
}
else
if
(
r
.
brackets
.
test
(
symbol
)){
// Rotated brackets
// Rotated brackets
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
-
5
,
h
:
25
,
rotate
:
true
})
if
(
bold
){
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
0
,
h
:
35
,
rotate
:
true
})
}
else
{
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
-
5
,
h
:
25
,
rotate
:
true
})
}
}
else
if
(
r
.
tilde
.
test
(
symbol
)){
}
else
if
(
r
.
tilde
.
test
(
symbol
)){
// Rotated hyphen, tilde
// Rotated hyphen, tilde
drawn
.
push
({
realText
:
symbol
,
text
:
symbol
===
"
~
"
?
"
~
"
:
symbol
,
x
:
0
,
y
:
2
,
h
:
35
,
rotate
:
true
})
drawn
.
push
({
realText
:
symbol
,
text
:
symbol
===
"
~
"
?
"
~
"
:
symbol
,
x
:
0
,
y
:
2
,
h
:
35
,
rotate
:
true
})
...
@@ -448,7 +475,7 @@
...
@@ -448,7 +475,7 @@
actions
.
push
(
"
selectable
"
)
actions
.
push
(
"
selectable
"
)
}
}
for
(
let
action
of
actions
){
for
(
let
action
of
actions
){
ctx
.
font
=
config
.
fontSize
+
"
px
"
+
config
.
fontFamily
ctx
.
font
=
bold
+
config
.
fontSize
+
"
px
"
+
config
.
fontFamily
ctx
.
textBaseline
=
"
top
"
ctx
.
textBaseline
=
"
top
"
if
(
action
===
"
stroke
"
){
if
(
action
===
"
stroke
"
){
ctx
.
strokeStyle
=
config
.
outline
ctx
.
strokeStyle
=
config
.
outline
...
@@ -571,6 +598,7 @@
...
@@ -571,6 +598,7 @@
inputText
=
inputText
.
slice
(
0
,
matches
.
index
)
inputText
=
inputText
.
slice
(
0
,
matches
.
index
)
ura
=
matches
[
0
]
ura
=
matches
[
0
]
}
}
var
bold
=
this
.
bold
(
config
.
fontFamily
)
var
string
=
inputText
.
split
(
""
)
var
string
=
inputText
.
split
(
""
)
var
drawn
=
[]
var
drawn
=
[]
...
@@ -587,12 +615,20 @@
...
@@ -587,12 +615,20 @@
}
else
if
(
symbol
===
"
'
"
){
}
else
if
(
symbol
===
"
'
"
){
drawn
.
push
({
text
:
"
,
"
,
x
:
0
,
y
:
-
15
,
w
:
7
,
scale
:
[
1
,
0.7
]})
drawn
.
push
({
text
:
"
,
"
,
x
:
0
,
y
:
-
15
,
w
:
7
,
scale
:
[
1
,
0.7
]})
}
else
if
(
symbol
===
"
∀
"
){
}
else
if
(
symbol
===
"
∀
"
){
drawn
.
push
({
text
:
symbol
,
x
:
-
3
,
y
:
0
,
w
:
55
})
if
(
bold
){
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
0
,
w
:
40
})
}
else
{
drawn
.
push
({
text
:
symbol
,
x
:
-
3
,
y
:
0
,
w
:
55
})
}
}
else
if
(
symbol
===
"
.
"
){
}
else
if
(
symbol
===
"
.
"
){
drawn
.
push
({
text
:
symbol
,
x
:
-
9
,
y
:
0
,
w
:
37
})
drawn
.
push
({
text
:
symbol
,
x
:
-
9
,
y
:
0
,
w
:
37
})
}
else
if
(
r
.
comma
.
test
(
symbol
)){
}
else
if
(
r
.
comma
.
test
(
symbol
)){
// Comma, full stop
// Comma, full stop
drawn
.
push
({
text
:
symbol
,
x
:
-
3
,
y
:
13
,
w
:
13
,
scale
:
[
1.2
,
0.7
]})
if
(
bold
){
drawn
.
push
({
text
:
symbol
,
x
:
-
3
,
y
:
0
,
w
:
13
})
}
else
{
drawn
.
push
({
text
:
symbol
,
x
:
-
3
,
y
:
13
,
w
:
13
,
scale
:
[
1.2
,
0.7
]})
}
}
else
if
(
r
.
en
.
test
(
symbol
)){
}
else
if
(
r
.
en
.
test
(
symbol
)){
// n-width
// n-width
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
0
,
w
:
28
})
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
0
,
w
:
28
})
...
@@ -614,7 +650,11 @@
...
@@ -614,7 +650,11 @@
drawn
.
push
({
text
:
number
,
x
:
0
,
y
:
0
,
w
:
32
})
drawn
.
push
({
text
:
number
,
x
:
0
,
y
:
0
,
w
:
32
})
}
else
if
(
r
.
degree
.
test
(
symbol
)){
}
else
if
(
r
.
degree
.
test
(
symbol
)){
// Degree
// Degree
drawn
.
push
({
text
:
symbol
,
x
:
5
,
y
:
0
,
w
:
0
})
if
(
bold
){
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
0
,
w
:
20
})
}
else
{
drawn
.
push
({
text
:
symbol
,
x
:
5
,
y
:
0
,
w
:
0
})
}
}
else
if
(
r
.
uppercase
.
test
(
symbol
)){
}
else
if
(
r
.
uppercase
.
test
(
symbol
)){
// Latin script uppercase
// Latin script uppercase
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
0
,
w
:
32
})
drawn
.
push
({
text
:
symbol
,
x
:
0
,
y
:
0
,
w
:
32
})
...
@@ -668,7 +708,7 @@
...
@@ -668,7 +708,7 @@
drawn
.
reverse
()
drawn
.
reverse
()
}
}
ctx
.
font
=
config
.
fontSize
+
"
px
"
+
config
.
fontFamily
ctx
.
font
=
bold
+
config
.
fontSize
+
"
px
"
+
config
.
fontFamily
ctx
.
textBaseline
=
config
.
baseline
||
"
top
"
ctx
.
textBaseline
=
config
.
baseline
||
"
top
"
ctx
.
textAlign
=
"
center
"
ctx
.
textAlign
=
"
center
"
...
@@ -965,32 +1005,65 @@
...
@@ -965,32 +1005,65 @@
if
(
config
.
scale
){
if
(
config
.
scale
){
ctx
.
scale
(
config
.
scale
,
config
.
scale
)
ctx
.
scale
(
config
.
scale
,
config
.
scale
)
}
}
if
(
config
.
align
===
"
center
"
){
ctx
.
translate
(
config
.
score
===
"
bad
"
?
-
49
/
2
:
-
23
/
2
,
0
)
}
ctx
.
strokeStyle
=
"
#000
"
ctx
.
strokeStyle
=
"
#000
"
ctx
.
lineWidth
=
7
ctx
.
lineWidth
=
7
if
(
config
.
score
===
"
good
"
){
if
(
strings
.
good
===
"
良
"
){
var
grd
=
ctx
.
createLinearGradient
(
0
,
0
,
0
,
29
)
if
(
config
.
align
===
"
center
"
){
grd
.
addColorStop
(
0.3
,
"
#f7fb00
"
)
ctx
.
translate
(
config
.
score
===
"
bad
"
?
-
49
/
2
:
-
23
/
2
,
0
)
grd
.
addColorStop
(
0.9
,
"
#ff4900
"
)
}
ctx
.
fillStyle
=
grd
if
(
config
.
score
===
"
good
"
){
ctx
.
stroke
(
this
.
diffPath
.
good
)
var
grd
=
ctx
.
createLinearGradient
(
0
,
0
,
0
,
29
)
ctx
.
fill
(
this
.
diffPath
.
good
)
grd
.
addColorStop
(
0.3
,
"
#f7fb00
"
)
}
else
if
(
config
.
score
===
"
ok
"
){
grd
.
addColorStop
(
0.9
,
"
#ff4900
"
)
ctx
.
fillStyle
=
"
#fff
"
ctx
.
fillStyle
=
grd
ctx
.
stroke
(
this
.
diffPath
.
ok
)
ctx
.
stroke
(
this
.
diffPath
.
good
)
ctx
.
fill
(
this
.
diffPath
.
ok
)
ctx
.
fill
(
this
.
diffPath
.
good
)
}
else
if
(
config
.
score
===
"
bad
"
){
}
else
if
(
config
.
score
===
"
ok
"
){
var
grd
=
ctx
.
createLinearGradient
(
0
,
0
,
0
,
27
)
ctx
.
fillStyle
=
"
#fff
"
grd
.
addColorStop
(
0.1
,
"
#6B5DFF
"
)
ctx
.
stroke
(
this
.
diffPath
.
ok
)
grd
.
addColorStop
(
0.7
,
"
#00AEDE
"
)
ctx
.
fill
(
this
.
diffPath
.
ok
)
ctx
.
fillStyle
=
grd
}
else
if
(
config
.
score
===
"
bad
"
){
ctx
.
stroke
(
this
.
diffPath
.
bad
)
var
grd
=
ctx
.
createLinearGradient
(
0
,
0
,
0
,
27
)
ctx
.
fill
(
this
.
diffPath
.
bad
)
grd
.
addColorStop
(
0.1
,
"
#6B5DFF
"
)
ctx
.
translate
(
26
,
0
)
grd
.
addColorStop
(
0.7
,
"
#00AEDE
"
)
ctx
.
stroke
(
this
.
diffPath
.
ok
)
ctx
.
fillStyle
=
grd
ctx
.
fill
(
this
.
diffPath
.
ok
)
ctx
.
stroke
(
this
.
diffPath
.
bad
)
ctx
.
fill
(
this
.
diffPath
.
bad
)
ctx
.
translate
(
26
,
0
)
ctx
.
stroke
(
this
.
diffPath
.
ok
)
ctx
.
fill
(
this
.
diffPath
.
ok
)
}
}
else
{
ctx
.
font
=
this
.
bold
(
strings
.
font
)
+
"
26px
"
+
strings
.
font
if
(
config
.
results
){
ctx
.
textAlign
=
"
left
"
}
else
{
ctx
.
textAlign
=
"
center
"
}
ctx
.
textBaseline
=
"
top
"
ctx
.
miterLimit
=
1
if
(
config
.
score
===
"
good
"
){
if
(
config
.
results
&&
strings
.
id
===
"
en
"
){
ctx
.
scale
(
0.75
,
1
)
}
var
grd
=
ctx
.
createLinearGradient
(
0
,
0
,
0
,
29
)
grd
.
addColorStop
(
0.3
,
"
#f7fb00
"
)
grd
.
addColorStop
(
0.9
,
"
#ff4900
"
)
ctx
.
fillStyle
=
grd
ctx
.
strokeText
(
strings
.
good
,
0
,
4
)
ctx
.
fillText
(
strings
.
good
,
0
,
4
)
}
else
if
(
config
.
score
===
"
ok
"
){
ctx
.
fillStyle
=
"
#fff
"
ctx
.
strokeText
(
strings
.
ok
,
0
,
4
)
ctx
.
fillText
(
strings
.
ok
,
0
,
4
)
}
else
if
(
config
.
score
===
"
bad
"
){
var
grd
=
ctx
.
createLinearGradient
(
0
,
0
,
0
,
27
)
grd
.
addColorStop
(
0.1
,
"
#6B5DFF
"
)
grd
.
addColorStop
(
0.7
,
"
#00AEDE
"
)
ctx
.
fillStyle
=
grd
ctx
.
strokeText
(
strings
.
bad
,
0
,
4
)
ctx
.
fillText
(
strings
.
bad
,
0
,
4
)
}
}
}
ctx
.
restore
()
ctx
.
restore
()
}
}
...
@@ -1252,6 +1325,10 @@
...
@@ -1252,6 +1325,10 @@
}
}
}
}
bold
(
font
){
return
font
===
"
Microsoft YaHei, sans-serif
"
?
"
bold
"
:
""
}
getMS
(){
getMS
(){
return
Date
.
now
()
return
Date
.
now
()
}
}
...
...
public/src/js/main.js
View file @
d28a607c
...
@@ -80,9 +80,10 @@ var perf = {
...
@@ -80,9 +80,10 @@ var perf = {
allImg
:
0
,
allImg
:
0
,
load
:
0
load
:
0
}
}
var
strings
pageEvents
.
add
(
root
,
[
"
touchstart
"
,
"
touchmove
"
,
"
touchend
"
],
event
=>
{
pageEvents
.
add
(
root
,
[
"
touchstart
"
,
"
touchmove
"
,
"
touchend
"
],
event
=>
{
if
(
event
.
cancelable
&&
cancelTouch
){
if
(
event
.
cancelable
&&
cancelTouch
&&
event
.
target
.
tagName
!==
"
SELECT
"
){
event
.
preventDefault
()
event
.
preventDefault
()
}
}
})
})
...
...
public/src/js/parseosu.js
View file @
d28a607c
...
@@ -319,10 +319,10 @@ class ParseOsu{
...
@@ -319,10 +319,10 @@ class ParseOsu{
if
(
hitSound
&
this
.
osu
.
FINISH
){
if
(
hitSound
&
this
.
osu
.
FINISH
){
if
(
hitSound
&
this
.
osu
.
WHISTLE
||
hitSound
&
this
.
osu
.
CLAP
){
if
(
hitSound
&
this
.
osu
.
WHISTLE
||
hitSound
&
this
.
osu
.
CLAP
){
type
=
"
daiKa
"
type
=
"
daiKa
"
txt
=
"
カッ(大)
"
txt
=
strings
.
note
.
daiKa
}
else
if
(
hitSound
&
this
.
osu
.
NORMAL
||
hitSound
===
this
.
osu
.
FINISH
){
}
else
if
(
hitSound
&
this
.
osu
.
NORMAL
||
hitSound
===
this
.
osu
.
FINISH
){
type
=
"
daiDon
"
type
=
"
daiDon
"
txt
=
"
ドン(大)
"
txt
=
strings
.
note
.
daiDon
}
else
{
}
else
{
emptyValue
=
true
emptyValue
=
true
}
}
...
...
public/src/js/scoresheet.js
View file @
d28a607c
...
@@ -16,7 +16,8 @@ class Scoresheet{
...
@@ -16,7 +16,8 @@ class Scoresheet{
this
.
fadeScreen
.
id
=
"
fade-screen
"
this
.
fadeScreen
.
id
=
"
fade-screen
"
this
.
game
.
appendChild
(
this
.
fadeScreen
)
this
.
game
.
appendChild
(
this
.
fadeScreen
)
this
.
font
=
"
TnT, Meiryo, sans-serif
"
this
.
font
=
strings
.
font
this
.
numbersFont
=
"
TnT, Meiryo, sans-serif
"
this
.
state
=
{
this
.
state
=
{
screen
:
"
fadeIn
"
,
screen
:
"
fadeIn
"
,
screenMS
:
this
.
getMS
(),
screenMS
:
this
.
getMS
(),
...
@@ -34,6 +35,14 @@ class Scoresheet{
...
@@ -34,6 +35,14 @@ class Scoresheet{
"
13
"
:
[
"
a
"
,
"
b
"
,
"
start
"
,
"
ls
"
,
"
rs
"
]
"
13
"
:
[
"
a
"
,
"
b
"
,
"
start
"
,
"
ls
"
,
"
rs
"
]
})
})
this
.
difficulty
=
{
"
easy
"
:
0
,
"
normal
"
:
1
,
"
hard
"
:
2
,
"
oni
"
:
3
,
"
ura
"
:
4
}
this
.
redrawRunning
=
true
this
.
redrawRunning
=
true
this
.
redrawBind
=
this
.
redraw
.
bind
(
this
)
this
.
redrawBind
=
this
.
redraw
.
bind
(
this
)
this
.
redraw
()
this
.
redraw
()
...
@@ -403,9 +412,10 @@ class Scoresheet{
...
@@ -403,9 +412,10 @@ class Scoresheet{
ctx
.
translate
(
0
,
p2Offset
)
ctx
.
translate
(
0
,
p2Offset
)
}
}
var
imgScale
=
1.35
ctx
.
drawImage
(
assets
.
image
[
"
difficulty
"
],
ctx
.
drawImage
(
assets
.
image
[
"
muzu_
"
+
results
.
difficulty
],
0
,
144
*
this
.
difficulty
[
results
.
difficulty
],
276
,
150
,
imgScale
*
176
,
imgScale
*
120
168
,
143
,
300
,
150
,
189
,
162
)
)
if
(
this
.
controller
.
autoPlayEnabled
){
if
(
this
.
controller
.
autoPlayEnabled
){
...
@@ -454,31 +464,40 @@ class Scoresheet{
...
@@ -454,31 +464,40 @@ class Scoresheet{
})
})
ctx
.
fillStyle
=
"
#000
"
ctx
.
fillStyle
=
"
#000
"
ctx
.
fill
()
ctx
.
fill
()
ctx
.
font
=
"
36px
"
+
this
.
font
this
.
draw
.
layeredText
({
ctx
.
textAlign
=
"
right
"
ctx
:
ctx
,
ctx
.
fillStyle
=
"
#fff
"
text
:
strings
.
points
,
ctx
.
strokeStyle
=
"
#000
"
x
:
792
,
ctx
.
lineWidth
=
0.5
y
:
strings
.
id
===
"
ko
"
?
260
:
253
,
ctx
.
fillText
(
strings
.
points
,
788
,
284
)
fontSize
:
36
,
ctx
.
strokeText
(
strings
.
points
,
788
,
284
)
fontFamily
:
this
.
font
,
align
:
"
right
"
,
width
:
36
},
[
{
fill
:
"
#fff
"
},
{
outline
:
"
#000
"
,
letterBorder
:
0.5
}
])
this
.
draw
.
score
({
this
.
draw
.
score
({
ctx
:
ctx
,
ctx
:
ctx
,
score
:
"
good
"
,
score
:
"
good
"
,
x
:
823
,
x
:
823
,
y
:
192
y
:
192
,
results
:
true
})
})
this
.
draw
.
score
({
this
.
draw
.
score
({
ctx
:
ctx
,
ctx
:
ctx
,
score
:
"
ok
"
,
score
:
"
ok
"
,
x
:
823
,
x
:
823
,
y
:
233
y
:
233
,
results
:
true
})
})
this
.
draw
.
score
({
this
.
draw
.
score
({
ctx
:
ctx
,
ctx
:
ctx
,
score
:
"
bad
"
,
score
:
"
bad
"
,
x
:
823
,
x
:
823
,
y
:
273
y
:
273
,
results
:
true
})
})
ctx
.
textAlign
=
"
right
"
ctx
.
textAlign
=
"
right
"
...
@@ -494,7 +513,7 @@ class Scoresheet{
...
@@ -494,7 +513,7 @@ class Scoresheet{
fontFamily
:
this
.
font
,
fontFamily
:
this
.
font
,
align
:
"
right
"
,
align
:
"
right
"
,
width
:
154
,
width
:
154
,
letterSpacing
:
1
letterSpacing
:
strings
.
id
===
"
ja
"
?
1
:
0
},
[
},
[
{
outline
:
"
#000
"
,
letterBorder
:
8
},
{
outline
:
"
#000
"
,
letterBorder
:
8
},
{
fill
:
grd
}
{
fill
:
grd
}
...
@@ -506,8 +525,9 @@ class Scoresheet{
...
@@ -506,8 +525,9 @@ class Scoresheet{
y
:
233
,
y
:
233
,
fontSize
:
29
,
fontSize
:
29
,
fontFamily
:
this
.
font
,
fontFamily
:
this
.
font
,
letterSpacing
:
4
,
align
:
"
right
"
,
align
:
"
right
"
width
:
154
,
letterSpacing
:
strings
.
id
===
"
ja
"
?
4
:
0
},
[
},
[
{
outline
:
"
#000
"
,
letterBorder
:
8
},
{
outline
:
"
#000
"
,
letterBorder
:
8
},
{
fill
:
"
#ffc700
"
}
{
fill
:
"
#ffc700
"
}
...
@@ -682,7 +702,7 @@ class Scoresheet{
...
@@ -682,7 +702,7 @@ class Scoresheet{
var
points
=
this
.
getNumber
(
results
.
points
,
3100
+
noCrownResultWait
,
elapsed
)
var
points
=
this
.
getNumber
(
results
.
points
,
3100
+
noCrownResultWait
,
elapsed
)
var
scale
=
1.3
var
scale
=
1.3
ctx
.
font
=
"
35px
"
+
this
.
f
ont
ctx
.
font
=
"
35px
"
+
this
.
numbersF
ont
ctx
.
translate
(
760
,
286
)
ctx
.
translate
(
760
,
286
)
ctx
.
scale
(
1
/
scale
,
1
*
1.1
)
ctx
.
scale
(
1
/
scale
,
1
*
1.1
)
ctx
.
textAlign
=
"
center
"
ctx
.
textAlign
=
"
center
"
...
@@ -714,7 +734,7 @@ class Scoresheet{
...
@@ -714,7 +734,7 @@ class Scoresheet{
x
:
971
+
270
*
Math
.
floor
(
i
/
3
),
x
:
971
+
270
*
Math
.
floor
(
i
/
3
),
y
:
196
+
(
40
*
(
i
%
3
)),
y
:
196
+
(
40
*
(
i
%
3
)),
fontSize
:
26
,
fontSize
:
26
,
fontFamily
:
this
.
f
ont
,
fontFamily
:
this
.
numbersF
ont
,
letterSpacing
:
1
,
letterSpacing
:
1
,
align
:
"
right
"
align
:
"
right
"
},
[
},
[
...
...
public/src/js/songselect.js
View file @
d28a607c
...
@@ -90,14 +90,15 @@ class SongSelect{
...
@@ -90,14 +90,15 @@ class SongSelect{
outline
:
"
#656565
"
outline
:
"
#656565
"
}
}
}
}
this
.
font
=
"
TnT, Meiryo, sans-serif
"
this
.
font
=
strings
.
font
this
.
songs
=
[]
this
.
songs
=
[]
for
(
let
song
of
assets
.
songs
){
for
(
let
song
of
assets
.
songs
){
var
en
=
strings
.
id
===
"
en
"
this
.
songs
.
push
({
this
.
songs
.
push
({
id
:
song
.
id
,
id
:
song
.
id
,
title
:
song
.
title
,
title
:
en
?
song
.
title_en
:
song
.
title
,
subtitle
:
song
.
subtitle
,
subtitle
:
en
?
song
.
subtitle_en
:
song
.
subtitle
,
skin
:
song
.
category
in
this
.
songSkin
?
this
.
songSkin
[
song
.
category
]
:
this
.
songSkin
.
default
,
skin
:
song
.
category
in
this
.
songSkin
?
this
.
songSkin
[
song
.
category
]
:
this
.
songSkin
.
default
,
stars
:
song
.
stars
,
stars
:
song
.
stars
,
category
:
song
.
category
,
category
:
song
.
category
,
...
@@ -793,7 +794,8 @@ class SongSelect{
...
@@ -793,7 +794,8 @@ class SongSelect{
ratio
+
0.2
ratio
+
0.2
)
)
this
.
selectTextCache
.
resize
((
280
+
53
+
60
+
1
)
*
2
,
this
.
songAsset
.
marginTop
+
15
,
ratio
+
0.5
)
var
textW
=
strings
.
id
===
"
en
"
?
350
:
280
this
.
selectTextCache
.
resize
((
textW
+
53
+
60
+
1
)
*
2
,
this
.
songAsset
.
marginTop
+
15
,
ratio
+
0.5
)
var
categories
=
0
var
categories
=
0
var
lastCategory
var
lastCategory
...
@@ -871,11 +873,12 @@ class SongSelect{
...
@@ -871,11 +873,12 @@ class SongSelect{
}
}
if
(
screen
===
"
title
"
||
screen
===
"
titleFadeIn
"
||
screen
===
"
song
"
){
if
(
screen
===
"
title
"
||
screen
===
"
titleFadeIn
"
||
screen
===
"
song
"
){
var
textW
=
strings
.
id
===
"
en
"
?
350
:
280
this
.
selectTextCache
.
get
({
this
.
selectTextCache
.
get
({
ctx
:
ctx
,
ctx
:
ctx
,
x
:
frameLeft
,
x
:
frameLeft
,
y
:
frameTop
,
y
:
frameTop
,
w
:
280
+
53
+
60
,
w
:
textW
+
53
+
60
,
h
:
this
.
songAsset
.
marginTop
+
15
,
h
:
this
.
songAsset
.
marginTop
+
15
,
id
:
"
song
"
id
:
"
song
"
},
ctx
=>
{
},
ctx
=>
{
...
@@ -886,6 +889,7 @@ class SongSelect{
...
@@ -886,6 +889,7 @@ class SongSelect{
fontFamily
:
this
.
font
,
fontFamily
:
this
.
font
,
x
:
53
,
x
:
53
,
y
:
30
,
y
:
30
,
width
:
textW
,
letterSpacing
:
2
,
letterSpacing
:
2
,
forceShadow
:
true
forceShadow
:
true
},
[
},
[
...
@@ -1089,8 +1093,7 @@ class SongSelect{
...
@@ -1089,8 +1093,7 @@ class SongSelect{
highlight
=
0
highlight
=
0
}
}
if
(
this
.
currentSongId
!==
currentSong
.
id
||
this
.
currentSongTitle
!==
currentSong
.
title
){
if
(
this
.
currentSongTitle
!==
currentSong
.
title
){
this
.
currentSongId
=
currentSong
.
id
this
.
currentSongTitle
=
currentSong
.
title
this
.
currentSongTitle
=
currentSong
.
title
this
.
currentSongCache
.
clear
()
this
.
currentSongCache
.
clear
()
}
}
...
@@ -1117,11 +1120,12 @@ class SongSelect{
...
@@ -1117,11 +1120,12 @@ class SongSelect{
var
opened
=
((
selectedWidth
-
this
.
songAsset
.
width
)
/
(
this
.
songAsset
.
selectedWidth
-
this
.
songAsset
.
width
))
var
opened
=
((
selectedWidth
-
this
.
songAsset
.
width
)
/
(
this
.
songAsset
.
selectedWidth
-
this
.
songAsset
.
width
))
var
songSel
=
true
var
songSel
=
true
}
else
{
}
else
{
var
textW
=
strings
.
id
===
"
en
"
?
350
:
280
this
.
selectTextCache
.
get
({
this
.
selectTextCache
.
get
({
ctx
:
ctx
,
ctx
:
ctx
,
x
:
x
-
144
-
53
,
x
:
x
-
144
-
53
,
y
:
y
-
24
-
30
,
y
:
y
-
24
-
30
,
w
:
280
+
53
+
60
,
w
:
textW
+
53
+
60
,
h
:
this
.
songAsset
.
marginTop
+
15
,
h
:
this
.
songAsset
.
marginTop
+
15
,
id
:
"
difficulty
"
id
:
"
difficulty
"
},
ctx
=>
{
},
ctx
=>
{
...
@@ -1132,7 +1136,7 @@ class SongSelect{
...
@@ -1132,7 +1136,7 @@ class SongSelect{
fontFamily
:
this
.
font
,
fontFamily
:
this
.
font
,
x
:
53
,
x
:
53
,
y
:
30
,
y
:
30
,
width
:
280
,
width
:
textW
,
forceShadow
:
true
forceShadow
:
true
},
[
},
[
{
x
:
-
2
,
y
:
-
2
,
outline
:
"
#000
"
,
letterBorder
:
23
},
{
x
:
-
2
,
y
:
-
2
,
outline
:
"
#000
"
,
letterBorder
:
23
},
...
@@ -1279,15 +1283,16 @@ class SongSelect{
...
@@ -1279,15 +1283,16 @@ class SongSelect{
h
:
(
songSel
?
88
:
135
)
+
10
,
h
:
(
songSel
?
88
:
135
)
+
10
,
id
:
this
.
difficulty
[
currentUra
?
4
:
i
]
+
(
songSel
?
"
1
"
:
"
0
"
)
id
:
this
.
difficulty
[
currentUra
?
4
:
i
]
+
(
songSel
?
"
1
"
:
"
0
"
)
},
ctx
=>
{
},
ctx
=>
{
var
ja
=
strings
.
id
===
"
ja
"
this
.
draw
.
verticalText
({
this
.
draw
.
verticalText
({
ctx
:
ctx
,
ctx
:
ctx
,
text
:
this
.
difficulty
[
i
],
text
:
this
.
difficulty
[
i
],
x
:
offset
,
x
:
offset
,
y
:
0
,
y
:
0
,
width
:
songSel
?
44
:
56
,
width
:
songSel
?
44
:
56
,
height
:
songSel
?
(
i
===
1
?
66
:
88
)
:
(
i
===
0
?
130
:
(
i
===
1
?
110
:
135
)),
height
:
songSel
?
(
i
===
1
&&
ja
?
66
:
88
)
:
(
ja
?
130
:
(
i
===
1
&&
ja
?
110
:
135
)),
fill
:
currentUra
?
"
#fff
"
:
"
#000
"
,
fill
:
currentUra
?
"
#fff
"
:
"
#000
"
,
fontSize
:
songSel
?
25
:
(
i
===
2
?
45
:
40
),
fontSize
:
songSel
?
25
:
(
i
===
2
&&
ja
?
45
:
40
),
fontFamily
:
this
.
font
,
fontFamily
:
this
.
font
,
outline
:
currentUra
?
"
#003C52
"
:
false
,
outline
:
currentUra
?
"
#003C52
"
:
false
,
outlineSize
:
currentUra
?
this
.
songAsset
.
letterBorder
:
0
outlineSize
:
currentUra
?
this
.
songAsset
.
letterBorder
:
0
...
...
public/src/js/strings.js
View file @
d28a607c
This diff is collapsed.
Click to expand it.
public/src/js/titlescreen.js
View file @
d28a607c
class
Titlescreen
{
class
Titlescreen
{
constructor
(){
constructor
(){
loader
.
changePage
(
"
titlescreen
"
,
false
)
loader
.
changePage
(
"
titlescreen
"
,
false
)
this
.
titleScreen
=
document
.
getElementById
(
"
title-screen
"
)
this
.
titleScreen
=
document
.
getElementById
(
"
title-screen
"
)
var
proceed
=
document
.
getElementById
(
"
title-proceed
"
)
this
.
proceed
=
document
.
getElementById
(
"
title-proceed
"
)
proceed
.
appendChild
(
document
.
createTextNode
(
strings
.
titleProceed
))
this
.
langDropdown
=
document
.
getElementById
(
"
lang-dropdown
"
)
proceed
.
setAttribute
(
"
alt
"
,
strings
.
titleProceed
)
this
.
langId
=
document
.
getElementById
(
"
lang-id
"
)
this
.
lang
=
this
.
getLang
()
this
.
setLang
(
allStrings
[
this
.
lang
])
this
.
addLangs
()
pageEvents
.
keyAdd
(
this
,
"
all
"
,
"
down
"
,
this
.
keyDown
.
bind
(
this
))
pageEvents
.
keyAdd
(
this
,
"
all
"
,
"
down
"
,
this
.
keyDown
.
bind
(
this
))
pageEvents
.
add
(
this
.
titleScreen
,
[
"
mousedown
"
,
"
touchstart
"
],
this
.
onPressed
.
bind
(
this
))
pageEvents
.
add
(
this
.
titleScreen
,
[
"
mousedown
"
,
"
touchstart
"
],
this
.
onPressed
.
bind
(
this
))
pageEvents
.
add
(
this
.
langDropdown
,
"
change
"
,
this
.
langChange
.
bind
(
this
))
assets
.
sounds
[
"
title
"
].
play
()
assets
.
sounds
[
"
title
"
].
play
()
this
.
gamepad
=
new
Gamepad
({
this
.
gamepad
=
new
Gamepad
({
"
13
"
:
[
"
a
"
,
"
b
"
,
"
x
"
,
"
y
"
,
"
start
"
,
"
ls
"
,
"
rs
"
]
"
13
"
:
[
"
a
"
,
"
b
"
,
"
x
"
,
"
y
"
,
"
start
"
,
"
ls
"
,
"
rs
"
]
...
@@ -24,7 +31,11 @@ class Titlescreen{
...
@@ -24,7 +31,11 @@ class Titlescreen{
})
})
}
}
}
}
keyDown
(
event
,
code
){
keyDown
(
event
,
code
){
if
(
event
&&
event
.
target
===
this
.
langDropdown
){
return
}
if
(
!
code
){
if
(
!
code
){
code
=
event
.
keyCode
code
=
event
.
keyCode
}
}
...
@@ -61,11 +72,58 @@ class Titlescreen{
...
@@ -61,11 +72,58 @@ class Titlescreen{
},
500
)
},
500
)
}
}
}
}
getLang
(){
if
(
localStorage
.
lang
&&
localStorage
.
lang
in
allStrings
){
return
localStorage
.
lang
}
if
(
"
languages
"
in
navigator
){
var
userLang
=
navigator
.
languages
.
slice
()
userLang
.
unshift
(
navigator
.
language
)
for
(
var
i
in
userLang
){
for
(
var
j
in
allStrings
){
if
(
allStrings
[
j
].
regex
.
test
(
userLang
[
i
])){
return
j
}
}
}
}
return
"
ja
"
}
setLang
(
lang
){
strings
=
lang
this
.
proceed
.
innerText
=
strings
.
titleProceed
this
.
proceed
.
setAttribute
(
"
alt
"
,
strings
.
titleProceed
)
this
.
langId
.
innerText
=
strings
.
id
.
toUpperCase
()
this
.
langId
.
setAttribute
(
"
alt
"
,
strings
.
id
.
toUpperCase
())
loader
.
screen
.
style
.
fontFamily
=
strings
.
font
loader
.
screen
.
style
.
fontWeight
=
strings
.
font
===
"
Microsoft YaHei, sans-serif
"
?
"
bold
"
:
""
}
addLangs
(){
for
(
var
i
in
allStrings
){
var
option
=
document
.
createElement
(
"
option
"
)
option
.
value
=
i
if
(
i
===
this
.
lang
){
option
.
selected
=
true
}
option
.
appendChild
(
document
.
createTextNode
(
allStrings
[
i
].
name
))
this
.
langDropdown
.
appendChild
(
option
)
}
}
langChange
(){
this
.
lang
=
this
.
langDropdown
.
value
localStorage
.
lang
=
this
.
lang
this
.
setLang
(
allStrings
[
this
.
lang
])
}
clean
(){
clean
(){
this
.
gamepad
.
clean
()
this
.
gamepad
.
clean
()
assets
.
sounds
[
"
title
"
].
stop
()
assets
.
sounds
[
"
title
"
].
stop
()
pageEvents
.
keyRemove
(
this
,
"
all
"
)
pageEvents
.
keyRemove
(
this
,
"
all
"
)
pageEvents
.
remove
(
this
.
titleScreen
,
[
"
mousedown
"
,
"
touchstart
"
])
pageEvents
.
remove
(
this
.
titleScreen
,
[
"
mousedown
"
,
"
touchstart
"
])
pageEvents
.
remove
(
this
.
langDropdown
,
"
change
"
)
delete
this
.
titleScreen
delete
this
.
titleScreen
delete
this
.
proceed
delete
this
.
langDropdown
}
}
}
}
public/src/js/view.js
View file @
d28a607c
...
@@ -49,6 +49,13 @@
...
@@ -49,6 +49,13 @@
infoFill
:
"
#656565
"
infoFill
:
"
#656565
"
}
}
}
}
this
.
difficulty
=
{
"
easy
"
:
0
,
"
normal
"
:
1
,
"
hard
"
:
2
,
"
oni
"
:
3
,
"
ura
"
:
4
}
this
.
currentScore
=
{
this
.
currentScore
=
{
ms
:
-
Infinity
,
ms
:
-
Infinity
,
...
@@ -69,7 +76,7 @@
...
@@ -69,7 +76,7 @@
this
.
drumroll
=
[]
this
.
drumroll
=
[]
this
.
beatInterval
=
this
.
controller
.
parsedSongData
.
beatInfo
.
beatInterval
this
.
beatInterval
=
this
.
controller
.
parsedSongData
.
beatInfo
.
beatInterval
this
.
font
=
"
TnT, Meiryo, sans-serif
"
this
.
font
=
strings
.
font
this
.
draw
=
new
CanvasDraw
()
this
.
draw
=
new
CanvasDraw
()
this
.
assets
=
new
ViewAssets
(
this
)
this
.
assets
=
new
ViewAssets
(
this
)
...
@@ -260,9 +267,14 @@
...
@@ -260,9 +267,14 @@
})
})
ctx
.
fill
()
ctx
.
fill
()
if
(
selectedSong
.
category
in
strings
.
categories
){
var
categoryName
=
strings
.
categories
[
selectedSong
.
category
]
}
else
{
var
categoryName
=
selectedSong
.
category
}
this
.
draw
.
layeredText
({
this
.
draw
.
layeredText
({
ctx
:
ctx
,
ctx
:
ctx
,
text
:
selectedSong
.
category
,
text
:
categoryName
,
fontSize
:
15
,
fontSize
:
15
,
fontFamily
:
this
.
font
,
fontFamily
:
this
.
font
,
align
:
"
center
"
,
align
:
"
center
"
,
...
@@ -389,13 +401,11 @@
...
@@ -389,13 +401,11 @@
ctx
.
fill
()
ctx
.
fill
()
// Difficulty
// Difficulty
var
badgeImg
=
assets
.
image
[
"
muzu_
"
+
this
.
controller
.
selectedSong
.
difficulty
]
ctx
.
drawImage
(
assets
.
image
[
"
difficulty
"
],
var
badgeW
=
badgeImg
.
width
/
badgeImg
.
height
*
53
0
,
144
*
this
.
difficulty
[
this
.
controller
.
selectedSong
.
difficulty
],
ctx
.
drawImage
(
badgeImg
,
168
,
143
,
157
-
badgeW
/
2
,
126
,
this
.
multiplayer
===
2
?
497
:
228
,
this
.
multiplayer
===
2
?
497
:
228
,
62
,
53
badgeW
,
53
)
)
// Badges
// Badges
...
@@ -540,11 +550,11 @@
...
@@ -540,11 +550,11 @@
ctx
.
globalAlpha
=
1
ctx
.
globalAlpha
=
1
// Difficulty
// Difficulty
var
badgeImg
=
assets
.
image
[
"
muzu_
"
+
this
.
controller
.
selectedSong
.
difficulty
]
ctx
.
drawImage
(
assets
.
image
[
"
difficulty
"
],
var
badgeW
=
badgeImg
.
width
/
badgeImg
.
height
*
120
0
,
144
*
this
.
difficulty
[
this
.
controller
.
selectedSong
.
difficulty
],
ctx
.
drawImage
(
badgeImg
,
168
,
143
,
87
-
badgeW
/
2
,
this
.
multiplayer
===
2
?
194
:
232
,
16
,
this
.
multiplayer
===
2
?
194
:
232
,
badgeW
,
120
141
,
120
)
)
// Badges
// Badges
...
@@ -629,7 +639,7 @@
...
@@ -629,7 +639,7 @@
// Score
// Score
ctx
.
save
()
ctx
.
save
()
ctx
.
font
=
"
30px
"
+
this
.
font
ctx
.
font
=
"
30px
TnT, Meiryo, sans-serif
"
ctx
.
fillStyle
=
"
#fff
"
ctx
.
fillStyle
=
"
#fff
"
ctx
.
strokeStyle
=
"
#fff
"
ctx
.
strokeStyle
=
"
#fff
"
ctx
.
lineWidth
=
0.3
ctx
.
lineWidth
=
0.3
...
@@ -763,11 +773,13 @@
...
@@ -763,11 +773,13 @@
}
else
{
}
else
{
ctx
.
fillStyle
=
"
#fff
"
ctx
.
fillStyle
=
"
#fff
"
}
}
ctx
.
font
=
fontSize
+
"
px
"
+
this
.
font
ctx
.
font
=
this
.
draw
.
bold
(
this
.
font
)
+
fontSize
+
"
px
"
+
this
.
font
ctx
.
lineWidth
=
7
*
mul
ctx
.
lineWidth
=
7
*
mul
ctx
.
textAlign
=
"
center
"
ctx
.
textAlign
=
"
center
"
ctx
.
strokeText
(
"
コンボ
"
,
comboX
,
comboTextY
)
ctx
.
miterLimit
=
1
ctx
.
fillText
(
"
コンボ
"
,
comboX
,
comboTextY
)
ctx
.
strokeText
(
strings
.
combo
,
comboX
,
comboTextY
)
ctx
.
miterLimit
=
10
ctx
.
fillText
(
strings
.
combo
,
comboX
,
comboTextY
)
}
}
// Slot
// Slot
...
@@ -931,7 +943,7 @@
...
@@ -931,7 +943,7 @@
x
:
_w
/
2
,
x
:
_w
/
2
,
y
:
18
,
y
:
18
,
width
:
_w
,
width
:
_w
,
height
:
_h
,
height
:
_h
-
54
,
fontSize
:
40
,
fontSize
:
40
,
fontFamily
:
this
.
font
,
fontFamily
:
this
.
font
,
letterSpacing
:
-
1
letterSpacing
:
-
1
...
@@ -1292,7 +1304,7 @@
...
@@ -1292,7 +1304,7 @@
var
text
=
circle
.
getText
()
var
text
=
circle
.
getText
()
var
textX
=
circlePos
.
x
var
textX
=
circlePos
.
x
var
textY
=
circlePos
.
y
+
83
*
mul
var
textY
=
circlePos
.
y
+
83
*
mul
ctx
.
font
=
lyricsSize
+
"
px Kozuka
"
ctx
.
font
=
lyricsSize
+
"
px Kozuka
, Microsoft YaHei, sans-serif
"
ctx
.
textBaseline
=
"
middle
"
ctx
.
textBaseline
=
"
middle
"
ctx
.
textAlign
=
"
center
"
ctx
.
textAlign
=
"
center
"
...
@@ -1373,7 +1385,7 @@
...
@@ -1373,7 +1385,7 @@
ctx
:
ctx
,
ctx
:
ctx
,
text
:
i
.
toString
(),
text
:
i
.
toString
(),
fontSize
:
fontSize
,
fontSize
:
fontSize
,
fontFamily
:
this
.
font
,
fontFamily
:
"
TnT, Meiryo, sans-serif
"
,
x
:
textX
,
x
:
textX
,
y
:
textY
y
:
textY
},
[
},
[
...
...
public/src/views/titlescreen.html
View file @
d28a607c
...
@@ -2,3 +2,8 @@
...
@@ -2,3 +2,8 @@
<div
class=
"logo-big"
>
太鼓の達人ウェブ
</div>
<div
class=
"logo-big"
>
太鼓の達人ウェブ
</div>
<div
class=
"click-to-continue stroke-sub"
id=
"title-proceed"
></div>
<div
class=
"click-to-continue stroke-sub"
id=
"title-proceed"
></div>
</div>
</div>
<div
id=
"lang"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 38 38"
id=
"lang-icon"
><circle
cx=
"19"
cy=
"19"
r=
"19"
/><path
d=
"M19 4V34M19 4C13 4 9 12 9 19 9 26 13 34 19 34 25 34 29 26 29 19 29 12 25 4 19 4ZM6 11H32M4 19H34M6 27h26"
style=
"fill:none;stroke-width:2;stroke:#fff"
/><circle
cx=
"19"
cy=
"19"
r=
"15"
style=
"fill:none;stroke-width:2;stroke:#fff"
/></svg>
<div
id=
"lang-id"
class=
"stroke-sub"
></div>
<select
id=
"lang-dropdown"
></select>
</div>
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