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
93d70dab
Commit
93d70dab
authored
Jan 22, 2019
by
Bui
Committed by
GitHub
Jan 22, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #128 from LoveEevee/strings-translate-views
Strings: Translate views
parents
a752aa75
e8768cc3
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
271 additions
and
50 deletions
+271
-50
public/src/js/about.js
public/src/js/about.js
+27
-6
public/src/js/scoresheet.js
public/src/js/scoresheet.js
+13
-1
public/src/js/session.js
public/src/js/session.js
+7
-0
public/src/js/songselect.js
public/src/js/songselect.js
+3
-3
public/src/js/strings.js
public/src/js/strings.js
+157
-7
public/src/js/tutorial.js
public/src/js/tutorial.js
+44
-0
public/src/js/view.js
public/src/js/view.js
+12
-0
public/src/views/about.html
public/src/views/about.html
+3
-14
public/src/views/session.html
public/src/views/session.html
+2
-4
public/src/views/tutorial.html
public/src/views/tutorial.html
+3
-15
No files found.
public/src/js/about.js
View file @
93d70dab
class
About
{
class
About
{
constructor
(
touchEnabled
){
constructor
(
touchEnabled
){
this
.
issueTemplate
=
[
"
###### 下記の問題を説明してください。 スクリーンショットと診断情報を含めてください。
"
,
"
###### Describe the problem you are having below. Please include a screenshot and the diagnostic information.
"
]
this
.
touchEnabled
=
touchEnabled
this
.
touchEnabled
=
touchEnabled
loader
.
changePage
(
"
about
"
,
true
)
loader
.
changePage
(
"
about
"
,
true
)
cancelTouch
=
false
cancelTouch
=
false
...
@@ -19,6 +14,21 @@
...
@@ -19,6 +14,21 @@
this
.
linkGithub
=
document
.
getElementById
(
"
link-github
"
)
this
.
linkGithub
=
document
.
getElementById
(
"
link-github
"
)
this
.
linkEmail
=
document
.
getElementById
(
"
link-email
"
)
this
.
linkEmail
=
document
.
getElementById
(
"
link-email
"
)
var
tutorialTitle
=
document
.
getElementById
(
"
tutorial-title
"
)
tutorialTitle
.
innerText
=
strings
.
aboutSimulator
tutorialTitle
.
setAttribute
(
"
alt
"
,
strings
.
aboutSimulator
)
var
tutorialContent
=
document
.
getElementById
(
"
tutorial-content
"
)
strings
.
about
.
bugReporting
.
forEach
(
string
=>
{
tutorialContent
.
appendChild
(
document
.
createTextNode
(
string
))
tutorialContent
.
appendChild
(
document
.
createElement
(
"
br
"
))
})
var
span
=
document
.
createElement
(
"
span
"
)
span
.
classList
.
add
(
"
text-warn
"
)
span
.
innerText
=
strings
.
about
.
diagnosticWarning
tutorialContent
.
appendChild
(
span
)
this
.
endButton
.
innerText
=
strings
.
tutorial
.
ok
this
.
endButton
.
setAttribute
(
"
alt
"
,
strings
.
tutorial
.
ok
)
pageEvents
.
add
(
this
.
linkGithub
,
[
"
click
"
,
"
touchend
"
],
this
.
linkButton
.
bind
(
this
))
pageEvents
.
add
(
this
.
linkGithub
,
[
"
click
"
,
"
touchend
"
],
this
.
linkButton
.
bind
(
this
))
pageEvents
.
add
(
this
.
linkEmail
,
[
"
click
"
,
"
touchend
"
],
this
.
linkButton
.
bind
(
this
))
pageEvents
.
add
(
this
.
linkEmail
,
[
"
click
"
,
"
touchend
"
],
this
.
linkButton
.
bind
(
this
))
pageEvents
.
once
(
this
.
endButton
,
[
"
mousedown
"
,
"
touchstart
"
]).
then
(
this
.
onEnd
.
bind
(
this
))
pageEvents
.
once
(
this
.
endButton
,
[
"
mousedown
"
,
"
touchstart
"
]).
then
(
this
.
onEnd
.
bind
(
this
))
...
@@ -71,6 +81,17 @@
...
@@ -71,6 +81,17 @@
}
}
}
}
}
}
var
userLangStr
=
"
(none)
"
if
(
"
languages
"
in
navigator
){
var
userLang
=
navigator
.
languages
.
slice
()
if
(
userLang
[
0
]
!==
navigator
.
language
){
userLang
.
unshift
(
navigator
.
language
)
}
if
(
userLang
.
length
!==
0
){
userLangStr
=
"
(
"
+
userLang
.
join
(
"
,
"
)
+
"
)
"
}
}
diag
.
push
(
"
Language:
"
+
strings
.
id
+
userLangStr
)
var
errorObj
=
{}
var
errorObj
=
{}
if
(
localStorage
[
"
lastError
"
]){
if
(
localStorage
[
"
lastError
"
]){
try
{
try
{
...
@@ -119,7 +140,7 @@
...
@@ -119,7 +140,7 @@
}
}
}
}
var
issueBody
=
this
.
issueTemplate
.
join
(
"
\n
"
)
+
"
\n\n\n\n
"
+
diag
var
issueBody
=
strings
.
issueTemplate
+
"
\n\n\n\n
"
+
diag
this
.
getLink
(
this
.
linkGithub
).
href
+=
"
?body=
"
+
encodeURIComponent
(
issueBody
)
this
.
getLink
(
this
.
linkGithub
).
href
+=
"
?body=
"
+
encodeURIComponent
(
issueBody
)
this
.
getLink
(
this
.
linkEmail
).
href
+=
"
?body=
"
+
encodeURIComponent
(
issueBody
.
replace
(
/
\n
/g
,
"
<br>
\r\n
"
))
this
.
getLink
(
this
.
linkEmail
).
href
+=
"
?body=
"
+
encodeURIComponent
(
issueBody
.
replace
(
/
\n
/g
,
"
<br>
\r\n
"
))
}
}
...
...
public/src/js/scoresheet.js
View file @
93d70dab
...
@@ -377,7 +377,7 @@ class Scoresheet{
...
@@ -377,7 +377,7 @@ class Scoresheet{
fontFamily
:
this
.
font
,
fontFamily
:
this
.
font
,
x
:
23
,
x
:
23
,
y
:
15
,
y
:
15
,
letterSpacing
:
3
,
letterSpacing
:
strings
.
id
===
"
en
"
?
0
:
3
,
forceShadow
:
true
forceShadow
:
true
},
[
},
[
{
x
:
-
2
,
y
:
-
2
,
outline
:
"
#000
"
,
letterBorder
:
22
},
{
x
:
-
2
,
y
:
-
2
,
outline
:
"
#000
"
,
letterBorder
:
22
},
...
@@ -417,6 +417,18 @@ class Scoresheet{
...
@@ -417,6 +417,18 @@ class Scoresheet{
168
,
143
,
168
,
143
,
300
,
150
,
189
,
162
300
,
150
,
189
,
162
)
)
var
diff
=
results
.
difficulty
var
text
=
strings
[
diff
===
"
ura
"
?
"
oni
"
:
diff
]
ctx
.
font
=
this
.
draw
.
bold
(
this
.
font
)
+
"
28px
"
+
this
.
font
ctx
.
textAlign
=
"
center
"
ctx
.
textBaseline
=
"
bottom
"
ctx
.
strokeStyle
=
"
#000
"
ctx
.
fillStyle
=
"
#fff
"
ctx
.
lineWidth
=
9
ctx
.
miterLimit
=
1
ctx
.
strokeText
(
text
,
395
,
308
)
ctx
.
fillText
(
text
,
395
,
308
)
ctx
.
miterLimit
=
10
if
(
this
.
controller
.
autoPlayEnabled
){
if
(
this
.
controller
.
autoPlayEnabled
){
ctx
.
drawImage
(
assets
.
image
[
"
badge_auto
"
],
ctx
.
drawImage
(
assets
.
image
[
"
badge_auto
"
],
...
...
public/src/js/session.js
View file @
93d70dab
...
@@ -8,6 +8,13 @@ class Session{
...
@@ -8,6 +8,13 @@ class Session{
}
}
this
.
sessionInvite
=
document
.
getElementById
(
"
session-invite
"
)
this
.
sessionInvite
=
document
.
getElementById
(
"
session-invite
"
)
var
tutorialTitle
=
document
.
getElementById
(
"
tutorial-title
"
)
tutorialTitle
.
innerText
=
strings
.
session
.
multiplayerSession
tutorialTitle
.
setAttribute
(
"
alt
"
,
strings
.
session
.
multiplayerSession
)
this
.
sessionInvite
.
parentNode
.
insertBefore
(
document
.
createTextNode
(
strings
.
session
.
linkTutorial
),
this
.
sessionInvite
)
this
.
endButton
.
innerText
=
strings
.
session
.
cancel
this
.
endButton
.
setAttribute
(
"
alt
"
,
strings
.
session
.
cancel
)
pageEvents
.
add
(
window
,
[
"
mousedown
"
,
"
touchstart
"
],
this
.
mouseDown
.
bind
(
this
))
pageEvents
.
add
(
window
,
[
"
mousedown
"
,
"
touchstart
"
],
this
.
mouseDown
.
bind
(
this
))
pageEvents
.
keyOnce
(
this
,
27
,
"
down
"
).
then
(
this
.
onEnd
.
bind
(
this
))
pageEvents
.
keyOnce
(
this
,
27
,
"
down
"
).
then
(
this
.
onEnd
.
bind
(
this
))
...
...
public/src/js/songselect.js
View file @
93d70dab
...
@@ -94,7 +94,7 @@ class SongSelect{
...
@@ -94,7 +94,7 @@ class SongSelect{
this
.
songs
=
[]
this
.
songs
=
[]
for
(
let
song
of
assets
.
songs
){
for
(
let
song
of
assets
.
songs
){
var
en
=
strings
.
id
===
"
en
"
var
en
=
strings
.
id
===
"
en
"
&&
song
.
title_en
this
.
songs
.
push
({
this
.
songs
.
push
({
id
:
song
.
id
,
id
:
song
.
id
,
title
:
en
?
song
.
title_en
:
song
.
title
,
title
:
en
?
song
.
title_en
:
song
.
title
,
...
@@ -135,7 +135,7 @@ class SongSelect{
...
@@ -135,7 +135,7 @@ class SongSelect{
}
}
}
else
{
}
else
{
this
.
songs
.
push
({
this
.
songs
.
push
({
title
:
strings
.
tutorial
,
title
:
strings
.
howToPlay
,
skin
:
this
.
songSkin
.
tutorial
,
skin
:
this
.
songSkin
.
tutorial
,
action
:
"
tutorial
"
,
action
:
"
tutorial
"
,
category
:
strings
.
random
category
:
strings
.
random
...
@@ -890,7 +890,7 @@ class SongSelect{
...
@@ -890,7 +890,7 @@ class SongSelect{
x
:
53
,
x
:
53
,
y
:
30
,
y
:
30
,
width
:
textW
,
width
:
textW
,
letterSpacing
:
2
,
letterSpacing
:
strings
.
id
===
"
en
"
?
0
:
2
,
forceShadow
:
true
forceShadow
:
true
},
[
},
[
{
x
:
-
2
,
y
:
-
2
,
outline
:
"
#000
"
,
letterBorder
:
22
},
{
x
:
-
2
,
y
:
-
2
,
outline
:
"
#000
"
,
letterBorder
:
22
},
...
...
public/src/js/strings.js
View file @
93d70dab
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
this
.
back
=
"
もどる
"
this
.
back
=
"
もどる
"
this
.
random
=
"
ランダム
"
this
.
random
=
"
ランダム
"
this
.
randomSong
=
"
ランダムに曲をえらぶ
"
this
.
randomSong
=
"
ランダムに曲をえらぶ
"
this
.
tutorial
=
"
あそびかた説明
"
this
.
howToPlay
=
"
あそびかた説明
"
this
.
aboutSimulator
=
"
このシミュレータについて
"
this
.
aboutSimulator
=
"
このシミュレータについて
"
this
.
browse
=
"
参照する…
"
this
.
browse
=
"
参照する…
"
this
.
defaultSongList
=
"
デフォルト曲リスト
"
this
.
defaultSongList
=
"
デフォルト曲リスト
"
...
@@ -58,6 +58,36 @@
...
@@ -58,6 +58,36 @@
this
.
points
=
"
点
"
this
.
points
=
"
点
"
this
.
maxCombo
=
"
最大コンボ数
"
this
.
maxCombo
=
"
最大コンボ数
"
this
.
drumroll
=
"
連打数
"
this
.
drumroll
=
"
連打数
"
this
.
tutorial
=
{
basics
:
[
"
Hit the drum when the notes reach the taiko!
"
,
"
For red notes, hit the face of the drum (%s or %s)...
"
,
"
...and for blue notes, hit the rim! (%s or %s)
"
,
"
USB controllers are also supported!
"
],
otherControls
:
"
Other controls
"
,
otherTutorial
:
[
"
%s
\
u2014 pause game
"
,
"
%s while selecting difficulty
\
u2014 enable autoplay mode
"
,
"
%s while selecting difficulty
\
u2014 enable 2P mode
"
],
ok
:
"
OK
"
}
this
.
about
=
{
bugReporting
:
[
"
このシミュレータは現在開発中です。
"
,
"
バグが発生した場合は、報告してください。
"
,
"
GitHubかメールでバグを報告してください。
"
],
diagnosticWarning
:
"
以下の端末診断情報も併せて報告してください!
"
,
issueTemplate
:
"
###### 下記の問題を説明してください。 スクリーンショットと診断情報を含めてください。
"
}
this
.
session
=
{
multiplayerSession
:
"
Multiplayer Session
"
,
linkTutorial
:
"
Share this link with your friend to start playing together! Do not leave this screen while they join.
"
,
cancel
:
"
Cancel
"
}
}
}
function
StringsEn
(){
function
StringsEn
(){
this
.
id
=
"
en
"
this
.
id
=
"
en
"
...
@@ -80,7 +110,7 @@ function StringsEn(){
...
@@ -80,7 +110,7 @@ function StringsEn(){
this
.
back
=
"
Back
"
this
.
back
=
"
Back
"
this
.
random
=
"
Random
"
this
.
random
=
"
Random
"
this
.
randomSong
=
"
Random Song
"
this
.
randomSong
=
"
Random Song
"
this
.
tutorial
=
"
How to Play
"
this
.
howToPlay
=
"
How to Play
"
this
.
aboutSimulator
=
"
About Simulator
"
this
.
aboutSimulator
=
"
About Simulator
"
this
.
browse
=
"
Browse…
"
this
.
browse
=
"
Browse…
"
this
.
defaultSongList
=
"
Default Song List
"
this
.
defaultSongList
=
"
Default Song List
"
...
@@ -119,11 +149,41 @@ function StringsEn(){
...
@@ -119,11 +149,41 @@ function StringsEn(){
this
.
points
=
"
pts
"
this
.
points
=
"
pts
"
this
.
maxCombo
=
"
MAX Combo
"
this
.
maxCombo
=
"
MAX Combo
"
this
.
drumroll
=
"
Drumroll
"
this
.
drumroll
=
"
Drumroll
"
this
.
tutorial
=
{
basics
:
[
"
Hit the drum when the notes reach the taiko!
"
,
"
For red notes, hit the face of the drum (%s or %s)...
"
,
"
...and for blue notes, hit the rim! (%s or %s)
"
,
"
USB controllers are also supported!
"
],
otherControls
:
"
Other controls
"
,
otherTutorial
:
[
"
%s
\
u2014 pause game
"
,
"
%s while selecting difficulty
\
u2014 enable autoplay mode
"
,
"
%s while selecting difficulty
\
u2014 enable 2P mode
"
],
ok
:
"
OK
"
}
this
.
about
=
{
bugReporting
:
[
"
This simulator is still in development.
"
,
"
Please report any bugs you find.
"
,
"
You can report bugs either via GitHub or email.
"
],
diagnosticWarning
:
"
Be sure to include the following diagnostic data!
"
,
issueTemplate
:
"
###### Describe the problem you are having below. Please include a screenshot and the diagnostic information.
"
}
this
.
session
=
{
multiplayerSession
:
"
Multiplayer Session
"
,
linkTutorial
:
"
Share this link with your friend to start playing together! Do not leave this screen while they join.
"
,
cancel
:
"
Cancel
"
}
}
}
function
StringsCn
(){
function
StringsCn
(){
this
.
id
=
"
cn
"
this
.
id
=
"
cn
"
this
.
name
=
"
简体中文
"
this
.
name
=
"
简体中文
"
this
.
regex
=
/^zh$|^zh-CN$/
this
.
regex
=
/^zh$|^zh-CN$
|^zh-SG$
/
this
.
font
=
"
Microsoft YaHei, sans-serif
"
this
.
font
=
"
Microsoft YaHei, sans-serif
"
this
.
titleProceed
=
"
点击或按回车!
"
this
.
titleProceed
=
"
点击或按回车!
"
...
@@ -141,7 +201,7 @@ function StringsCn(){
...
@@ -141,7 +201,7 @@ function StringsCn(){
this
.
back
=
"
返回
"
this
.
back
=
"
返回
"
this
.
random
=
"
随机
"
this
.
random
=
"
随机
"
this
.
randomSong
=
"
随机选曲
"
this
.
randomSong
=
"
随机选曲
"
this
.
tutorial
=
"
操作说明
"
this
.
howToPlay
=
"
操作说明
"
this
.
aboutSimulator
=
"
关于模拟器
"
this
.
aboutSimulator
=
"
关于模拟器
"
this
.
browse
=
"
浏览…
"
this
.
browse
=
"
浏览…
"
this
.
defaultSongList
=
"
默认歌曲列表
"
this
.
defaultSongList
=
"
默认歌曲列表
"
...
@@ -180,6 +240,36 @@ function StringsCn(){
...
@@ -180,6 +240,36 @@ function StringsCn(){
this
.
points
=
"
点
"
this
.
points
=
"
点
"
this
.
maxCombo
=
"
最多连段数
"
this
.
maxCombo
=
"
最多连段数
"
this
.
drumroll
=
"
连打数
"
this
.
drumroll
=
"
连打数
"
this
.
tutorial
=
{
basics
:
[
"
Hit the drum when the notes reach the taiko!
"
,
"
For red notes, hit the face of the drum (%s or %s)...
"
,
"
...and for blue notes, hit the rim! (%s or %s)
"
,
"
USB controllers are also supported!
"
],
otherControls
:
"
Other controls
"
,
otherTutorial
:
[
"
%s
\
u2014 pause game
"
,
"
%s while selecting difficulty
\
u2014 enable autoplay mode
"
,
"
%s while selecting difficulty
\
u2014 enable 2P mode
"
],
ok
:
"
OK
"
}
this
.
about
=
{
bugReporting
:
[
"
This simulator is still in development.
"
,
"
Please report any bugs you find.
"
,
"
You can report bugs either via GitHub or email.
"
],
diagnosticWarning
:
"
Be sure to include the following diagnostic data!
"
,
issueTemplate
:
"
###### Describe the problem you are having below. Please include a screenshot and the diagnostic information.
"
}
this
.
session
=
{
multiplayerSession
:
"
Multiplayer Session
"
,
linkTutorial
:
"
Share this link with your friend to start playing together! Do not leave this screen while they join.
"
,
cancel
:
"
Cancel
"
}
}
}
function
StringsTw
(){
function
StringsTw
(){
this
.
id
=
"
tw
"
this
.
id
=
"
tw
"
...
@@ -202,7 +292,7 @@ function StringsTw(){
...
@@ -202,7 +292,7 @@ function StringsTw(){
this
.
back
=
"
返回
"
this
.
back
=
"
返回
"
this
.
random
=
"
隨機
"
this
.
random
=
"
隨機
"
this
.
randomSong
=
"
隨機選曲
"
this
.
randomSong
=
"
隨機選曲
"
this
.
tutorial
=
"
操作說明
"
this
.
howToPlay
=
"
操作說明
"
this
.
aboutSimulator
=
"
關於模擬器
"
this
.
aboutSimulator
=
"
關於模擬器
"
this
.
browse
=
"
開啟檔案…
"
this
.
browse
=
"
開啟檔案…
"
this
.
defaultSongList
=
"
默認歌曲列表
"
this
.
defaultSongList
=
"
默認歌曲列表
"
...
@@ -241,11 +331,41 @@ function StringsTw(){
...
@@ -241,11 +331,41 @@ function StringsTw(){
this
.
points
=
"
分
"
this
.
points
=
"
分
"
this
.
maxCombo
=
"
最多連段數
"
this
.
maxCombo
=
"
最多連段數
"
this
.
drumroll
=
"
連打數
"
this
.
drumroll
=
"
連打數
"
this
.
tutorial
=
{
basics
:
[
"
Hit the drum when the notes reach the taiko!
"
,
"
For red notes, hit the face of the drum (%s or %s)...
"
,
"
...and for blue notes, hit the rim! (%s or %s)
"
,
"
USB controllers are also supported!
"
],
otherControls
:
"
Other controls
"
,
otherTutorial
:
[
"
%s
\
u2014 pause game
"
,
"
%s while selecting difficulty
\
u2014 enable autoplay mode
"
,
"
%s while selecting difficulty
\
u2014 enable 2P mode
"
],
ok
:
"
OK
"
}
this
.
about
=
{
bugReporting
:
[
"
This simulator is still in development.
"
,
"
Please report any bugs you find.
"
,
"
You can report bugs either via GitHub or email.
"
],
diagnosticWarning
:
"
Be sure to include the following diagnostic data!
"
,
issueTemplate
:
"
###### Describe the problem you are having below. Please include a screenshot and the diagnostic information.
"
}
this
.
session
=
{
multiplayerSession
:
"
Multiplayer Session
"
,
linkTutorial
:
"
Share this link with your friend to start playing together! Do not leave this screen while they join.
"
,
cancel
:
"
Cancel
"
}
}
}
function
StringsKo
(){
function
StringsKo
(){
this
.
id
=
"
ko
"
this
.
id
=
"
ko
"
this
.
name
=
"
한국어
"
this
.
name
=
"
한국어
"
this
.
regex
=
/^ko$/
this
.
regex
=
/^ko$
|^ko-
/
this
.
font
=
"
Microsoft YaHei, sans-serif
"
this
.
font
=
"
Microsoft YaHei, sans-serif
"
this
.
titleProceed
=
"
클릭하거나 Enter를 누릅니다!
"
this
.
titleProceed
=
"
클릭하거나 Enter를 누릅니다!
"
...
@@ -263,7 +383,7 @@ function StringsKo(){
...
@@ -263,7 +383,7 @@ function StringsKo(){
this
.
back
=
"
돌아간다
"
this
.
back
=
"
돌아간다
"
this
.
random
=
"
랜덤
"
this
.
random
=
"
랜덤
"
this
.
randomSong
=
"
랜덤
"
this
.
randomSong
=
"
랜덤
"
this
.
tutorial
=
"
지도 시간
"
this
.
howToPlay
=
"
지도 시간
"
this
.
aboutSimulator
=
"
게임 정보
"
this
.
aboutSimulator
=
"
게임 정보
"
this
.
browse
=
"
찾아보기…
"
this
.
browse
=
"
찾아보기…
"
this
.
defaultSongList
=
"
기본 노래 목록
"
this
.
defaultSongList
=
"
기본 노래 목록
"
...
@@ -302,6 +422,36 @@ function StringsKo(){
...
@@ -302,6 +422,36 @@ function StringsKo(){
this
.
points
=
"
점
"
this
.
points
=
"
점
"
this
.
maxCombo
=
"
최대 콤보 수
"
this
.
maxCombo
=
"
최대 콤보 수
"
this
.
drumroll
=
"
연타 횟수
"
this
.
drumroll
=
"
연타 횟수
"
this
.
tutorial
=
{
basics
:
[
"
Hit the drum when the notes reach the taiko!
"
,
"
For red notes, hit the face of the drum (%s or %s)...
"
,
"
...and for blue notes, hit the rim! (%s or %s)
"
,
"
USB controllers are also supported!
"
],
otherControls
:
"
Other controls
"
,
otherTutorial
:
[
"
%s
\
u2014 pause game
"
,
"
%s while selecting difficulty
\
u2014 enable autoplay mode
"
,
"
%s while selecting difficulty
\
u2014 enable 2P mode
"
],
ok
:
"
OK
"
}
this
.
about
=
{
bugReporting
:
[
"
This simulator is still in development.
"
,
"
Please report any bugs you find.
"
,
"
You can report bugs either via GitHub or email.
"
],
diagnosticWarning
:
"
Be sure to include the following diagnostic data!
"
,
issueTemplate
:
"
###### Describe the problem you are having below. Please include a screenshot and the diagnostic information.
"
}
this
.
session
=
{
multiplayerSession
:
"
Multiplayer Session
"
,
linkTutorial
:
"
Share this link with your friend to start playing together! Do not leave this screen while they join.
"
,
cancel
:
"
Cancel
"
}
}
}
var
allStrings
=
{
var
allStrings
=
{
"
ja
"
:
new
StringsJa
(),
"
ja
"
:
new
StringsJa
(),
...
...
public/src/js/tutorial.js
View file @
93d70dab
...
@@ -5,6 +5,42 @@ class Tutorial{
...
@@ -5,6 +5,42 @@ class Tutorial{
assets
.
sounds
[
"
bgm_setsume
"
].
playLoop
(
0.1
,
false
,
0
,
1.054
,
16.054
)
assets
.
sounds
[
"
bgm_setsume
"
].
playLoop
(
0.1
,
false
,
0
,
1.054
,
16.054
)
this
.
endButton
=
document
.
getElementById
(
"
tutorial-end-button
"
)
this
.
endButton
=
document
.
getElementById
(
"
tutorial-end-button
"
)
var
tutorialTitle
=
document
.
getElementById
(
"
tutorial-title
"
)
tutorialTitle
.
innerText
=
strings
.
howToPlay
tutorialTitle
.
setAttribute
(
"
alt
"
,
strings
.
howToPlay
)
var
tutorialContent
=
document
.
getElementById
(
"
tutorial-content
"
)
var
keys
=
[
"
F
"
,
"
J
"
,
"
D
"
,
"
K
"
,
"
Q
"
,
"
SHIFT
"
,
"
CTRL
"
]
var
keyIndex
=
0
strings
.
tutorial
.
basics
.
forEach
(
string
=>
{
var
par
=
document
.
createElement
(
"
p
"
)
var
stringKeys
=
string
.
split
(
"
%s
"
)
stringKeys
.
forEach
((
stringKey
,
i
)
=>
{
if
(
i
!==
0
){
this
.
insertKey
(
keys
[
keyIndex
++
],
par
)
}
this
.
insertText
(
stringKey
,
par
)
})
tutorialContent
.
appendChild
(
par
)
})
var
par
=
document
.
createElement
(
"
p
"
)
var
span
=
document
.
createElement
(
"
span
"
)
span
.
style
.
fontWeight
=
"
bold
"
span
.
innerText
=
strings
.
tutorial
.
otherControls
par
.
appendChild
(
span
)
strings
.
tutorial
.
otherTutorial
.
forEach
(
string
=>
{
par
.
appendChild
(
document
.
createElement
(
"
br
"
))
var
stringKeys
=
string
.
split
(
"
%s
"
)
stringKeys
.
forEach
((
stringKey
,
i
)
=>
{
if
(
i
!==
0
){
this
.
insertKey
(
keys
[
keyIndex
++
],
par
)
}
this
.
insertText
(
stringKey
,
par
)
})
})
tutorialContent
.
appendChild
(
par
)
this
.
endButton
.
innerText
=
strings
.
tutorial
.
ok
this
.
endButton
.
setAttribute
(
"
alt
"
,
strings
.
tutorial
.
ok
)
pageEvents
.
once
(
this
.
endButton
,
[
"
mousedown
"
,
"
touchstart
"
]).
then
(
this
.
onEnd
.
bind
(
this
))
pageEvents
.
once
(
this
.
endButton
,
[
"
mousedown
"
,
"
touchstart
"
]).
then
(
this
.
onEnd
.
bind
(
this
))
pageEvents
.
keyOnce
(
this
,
13
,
"
down
"
).
then
(
this
.
onEnd
.
bind
(
this
))
pageEvents
.
keyOnce
(
this
,
13
,
"
down
"
).
then
(
this
.
onEnd
.
bind
(
this
))
...
@@ -12,6 +48,14 @@ class Tutorial{
...
@@ -12,6 +48,14 @@ class Tutorial{
"
confirm
"
:
[
"
start
"
,
"
b
"
,
"
ls
"
,
"
rs
"
]
"
confirm
"
:
[
"
start
"
,
"
b
"
,
"
ls
"
,
"
rs
"
]
},
this
.
onEnd
.
bind
(
this
))
},
this
.
onEnd
.
bind
(
this
))
}
}
insertText
(
text
,
parent
){
parent
.
appendChild
(
document
.
createTextNode
(
text
))
}
insertKey
(
key
,
parent
){
var
kbd
=
document
.
createElement
(
"
kbd
"
)
kbd
.
innerText
=
key
parent
.
appendChild
(
kbd
)
}
onEnd
(
event
){
onEnd
(
event
){
var
touched
=
false
var
touched
=
false
if
(
event
&&
event
.
type
===
"
touchstart
"
){
if
(
event
&&
event
.
type
===
"
touchstart
"
){
...
...
public/src/js/view.js
View file @
93d70dab
...
@@ -556,6 +556,18 @@
...
@@ -556,6 +556,18 @@
16
,
this
.
multiplayer
===
2
?
194
:
232
,
16
,
this
.
multiplayer
===
2
?
194
:
232
,
141
,
120
141
,
120
)
)
var
diff
=
this
.
controller
.
selectedSong
.
difficulty
var
text
=
strings
[
diff
===
"
ura
"
?
"
oni
"
:
diff
]
ctx
.
font
=
this
.
draw
.
bold
(
this
.
font
)
+
"
20px
"
+
this
.
font
ctx
.
textAlign
=
"
center
"
ctx
.
textBaseline
=
"
bottom
"
ctx
.
strokeStyle
=
"
#000
"
ctx
.
fillStyle
=
"
#fff
"
ctx
.
lineWidth
=
7
ctx
.
miterLimit
=
1
ctx
.
strokeText
(
text
,
87
,
this
.
multiplayer
===
2
?
310
:
348
)
ctx
.
fillText
(
text
,
87
,
this
.
multiplayer
===
2
?
310
:
348
)
ctx
.
miterLimit
=
10
// Badges
// Badges
if
(
this
.
controller
.
autoPlayEnabled
&&
!
this
.
controller
.
multiplayer
){
if
(
this
.
controller
.
autoPlayEnabled
&&
!
this
.
controller
.
multiplayer
){
...
...
public/src/views/about.html
View file @
93d70dab
<div
id=
"tutorial-outer"
>
<div
id=
"tutorial-outer"
>
<div
id=
"tutorial"
>
<div
id=
"tutorial"
>
<div
id=
"tutorial-title"
class=
"stroke-sub"
alt=
"このシミュレータについて / About"
>
このシミュレータについて / About
</div>
<div
id=
"tutorial-title"
class=
"stroke-sub"
></div>
<div
id=
"tutorial-content"
>
<div
id=
"tutorial-content"
></div>
このシミュレータは現在開発中です。
<br>
バグが発生した場合は、報告してください。
<br>
GitHubかメールでバグを報告してください。
<br>
<span
class=
"text-warn"
>
以下の端末診断情報も併せて報告してください!
</span><br>
<br>
This simulator is still in development.
<br>
Please report any bugs you find.
<br>
You can report bugs either via GitHub or email.
<br>
<span
class=
"text-warn"
>
Be sure to include the following diagnostic data!
</span>
</div>
<div
id=
"diag-txt"
></div>
<div
id=
"diag-txt"
></div>
<div
id=
"about-link-btns"
>
<div
id=
"about-link-btns"
>
<div
id=
"link-github"
class=
"taibtn stroke-sub link-btn"
alt=
"GitHub"
>
<div
id=
"link-github"
class=
"taibtn stroke-sub link-btn"
alt=
"GitHub"
>
...
@@ -22,6 +11,6 @@
...
@@ -22,6 +11,6 @@
<a
href=
"mailto:taiko@bui.pm"
>
taiko@bui.pm
</a>
<a
href=
"mailto:taiko@bui.pm"
>
taiko@bui.pm
</a>
</div>
</div>
</div>
</div>
<div
id=
"tutorial-end-button"
class=
"taibtn stroke-sub"
alt=
"OK"
>
OK
</div>
<div
id=
"tutorial-end-button"
class=
"taibtn stroke-sub"
>
</div>
</div>
</div>
</div>
</div>
public/src/views/session.html
View file @
93d70dab
<div
id=
"tutorial-outer"
>
<div
id=
"tutorial-outer"
>
<div
id=
"tutorial"
>
<div
id=
"tutorial"
>
<div
id=
"tutorial-title"
class=
"stroke-sub"
alt=
"Multiplayer Session"
>
Multiplayer Session
</div>
<div
id=
"tutorial-title"
class=
"stroke-sub"
>
</div>
<div
id=
"tutorial-content"
>
<div
id=
"tutorial-content"
>
Share this link with your friend to start playing together! Do not leave this screen while they join.
<div
id=
"session-invite"
></div>
<div
id=
"session-invite"
></div>
</div>
</div>
<div
id=
"tutorial-end-button"
class=
"taibtn stroke-sub"
></div>
<div
id=
"tutorial-end-button"
class=
"taibtn stroke-sub"
alt=
"Cancel"
>
Cancel
</div>
</div>
</div>
</div>
</div>
public/src/views/tutorial.html
View file @
93d70dab
<div
id=
"tutorial-outer"
>
<div
id=
"tutorial-outer"
>
<div
id=
"tutorial"
>
<div
id=
"tutorial"
>
<div
id=
"tutorial-title"
class=
"stroke-sub"
alt=
"How to Play"
>
How to Play
</div>
<div
id=
"tutorial-title"
class=
"stroke-sub"
></div>
<div
id=
"tutorial-content"
>
<div
id=
"tutorial-content"
></div>
<p>
Hit the drum when the notes reach the taiko!
</p>
<div
id=
"tutorial-end-button"
class=
"taibtn stroke-sub"
></div>
<p>
For red notes, hit the face of the drum (
<kbd>
F
</kbd>
or
<kbd>
J
</kbd>
)...
</p>
<p>
...and for blue notes, hit the rim! (
<kbd>
D
</kbd>
or
<kbd>
K
</kbd>
)
</p>
<p>
USB controllers are also supported!
</p>
<p>
<span
style=
"font-weight:bold;"
>
Other controls
</span><br>
<kbd>
Q
</kbd>
—
pause game
<br>
<kbd>
SHIFT
</kbd>
while selecting difficulty
—
enable autoplay mode
<br>
<kbd>
CTRL
</kbd>
while selecting difficulty
—
enable 2P mode
</p>
</div>
<div
id=
"tutorial-end-button"
class=
"taibtn stroke-sub"
alt=
"OK"
>
OK
</div>
</div>
</div>
</div>
</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