Keyboard: Add TaTaCon buttons

This commit is contained in:
LoveEevee 2018-10-08 23:32:25 +03:00
parent 13f9981e6f
commit 32caec8fac
7 changed files with 10 additions and 10 deletions

View File

@ -15,6 +15,7 @@
<title>太鼓の達人ウェブ - Taiko no Tatsujin Web</title> <title>太鼓の達人ウェブ - Taiko no Tatsujin Web</title>
<link rel="icon" href="/assets/img/favicon.png" type="image/png"> <link rel="icon" href="/assets/img/favicon.png" type="image/png">
<meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="/src/css/main.css"/> <link rel="stylesheet" href="/src/css/main.css"/>
<link rel="stylesheet" href="/src/css/loader.css"> <link rel="stylesheet" href="/src/css/loader.css">

View File

@ -24,8 +24,8 @@ class Keyboard{
} }
var gameBtn = {} var gameBtn = {}
gameBtn[this.kbd["don_l"]] = ["u", "d", "l", "r"] gameBtn[this.kbd["don_l"]] = ["u", "d", "l", "r", "ls"]
gameBtn[this.kbd["don_r"]] = ["a", "b", "x", "y"] gameBtn[this.kbd["don_r"]] = ["a", "b", "x", "y", "rs"]
gameBtn[this.kbd["ka_l"]] = ["lb", "lt"] gameBtn[this.kbd["ka_l"]] = ["lb", "lt"]
gameBtn[this.kbd["ka_r"]] = ["rb", "rt"] gameBtn[this.kbd["ka_r"]] = ["rb", "rt"]
this.gamepad = new Gamepad(gameBtn) this.gamepad = new Gamepad(gameBtn)
@ -33,7 +33,7 @@ class Keyboard{
var menuBtn = { var menuBtn = {
"cancel": ["a"], "cancel": ["a"],
} }
menuBtn[this.kbd["confirm"]] = ["b"] menuBtn[this.kbd["confirm"]] = ["b", "ls", "rs"]
menuBtn[this.kbd["previous"]] = ["u", "l", "lb", "lt"], menuBtn[this.kbd["previous"]] = ["u", "l", "lb", "lt"],
menuBtn[this.kbd["next"]] = ["d", "r", "rb", "rt"] menuBtn[this.kbd["next"]] = ["d", "r", "rb", "rt"]
menuBtn[this.kbd["pause"]] = ["start"] menuBtn[this.kbd["pause"]] = ["start"]

View File

@ -23,7 +23,7 @@ class Scoresheet{
this.draw = new CanvasDraw() this.draw = new CanvasDraw()
this.gamepad = new Gamepad({ this.gamepad = new Gamepad({
"13": ["a", "b", "start"] "13": ["a", "b", "start", "ls", "rs"]
}) })
this.redrawRunning = true this.redrawRunning = true

View File

@ -187,7 +187,7 @@ class SongSelect{
this.pressedKeys = {} this.pressedKeys = {}
this.gamepad = new Gamepad({ this.gamepad = new Gamepad({
"13": ["b", "start"], "13": ["b", "start", "ls", "rs"],
"8": ["a"], "8": ["a"],
"37": ["l", "lb", "lt"], "37": ["l", "lb", "lt"],
"39": ["r", "rb", "rt"], "39": ["r", "rb", "rt"],

View File

@ -7,9 +7,8 @@ class Titlescreen{
pageEvents.once(this.titleScreen, "touchstart").then(this.onPressed.bind(this)) pageEvents.once(this.titleScreen, "touchstart").then(this.onPressed.bind(this))
assets.sounds["title"].play() assets.sounds["title"].play()
this.gamepad = new Gamepad({ this.gamepad = new Gamepad({
"start": ["b", "x", "y", "start"], "start": ["a", "b", "x", "y", "start", "ls", "rs"]
"a": ["a"] }, pressed => {
}, (pressed, key) => {
if(pressed){ if(pressed){
this.onPressed() this.onPressed()
} }

View File

@ -10,7 +10,7 @@ class Tutorial{
pageEvents.keyOnce(this, 13, "down").then(this.onEnd.bind(this)) pageEvents.keyOnce(this, 13, "down").then(this.onEnd.bind(this))
this.gamepad = new Gamepad({ this.gamepad = new Gamepad({
"confirm": ["start", "b"] "confirm": ["start", "b", "ls", "rs"]
}, this.onEnd.bind(this)) }, this.onEnd.bind(this))
} }
onEnd(event){ onEnd(event){