From 9e60cf0feef329c5276c5266b061cddc32077c93 Mon Sep 17 00:00:00 2001 From: Bui Date: Mon, 6 Aug 2018 16:34:59 +0100 Subject: [PATCH] aaa --- src/css/game.css | 1 + src/css/main.css | 2 +- src/js/controller.js | 2 +- src/js/scoresheet.js | 5 +++-- src/js/view.js | 6 +++++- src/views/game.html | 1 + 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/css/game.css b/src/css/game.css index 8266892..cc74c06 100644 --- a/src/css/game.css +++ b/src/css/game.css @@ -17,6 +17,7 @@ top:0; left:0; background:rgba(0,0,0,0.75); + z-index: 5; } #pause-menu button{ diff --git a/src/css/main.css b/src/css/main.css index 1477bf3..c1e519f 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -54,7 +54,7 @@ html, body{ z-index: 1; } -.result-song { +.result-song, .game-song { position: absolute; right: 0; font-size: 5vmin; diff --git a/src/js/controller.js b/src/js/controller.js index c859487..3340e20 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -7,7 +7,7 @@ function Controller(selectedSong, songData){ var _songData = _songParser.getData(); var _game = new Game(this, selectedSong, _songData); - var _view = new View(this, _backgroundURL); + var _view = new View(this, _backgroundURL, selectedSong.title); var _keyboard = new Keyboard(this); var _mainLoop; var _pauseMenu = false; diff --git a/src/js/scoresheet.js b/src/js/scoresheet.js index 98b594e..e538686 100644 --- a/src/js/scoresheet.js +++ b/src/js/scoresheet.js @@ -1,3 +1,4 @@ + function Scoresheet(controller, score){ var _this = this; @@ -85,14 +86,14 @@ function Scoresheet(controller, score){ $("#song-select").click(function(){ assets.sounds["don"].play(); assets.sounds["bgm_results"].pause(); - assets.sounds["bgm_songsel"].currentTime = 0; + assets.sounds["bgm_results"].currentTime = 0; controller.songSelection(); }); $("#replay").click(function(){ assets.sounds["don"].play(); assets.sounds["bgm_results"].pause(); - assets.sounds["bgm_songsel"].currentTime = 0; + assets.sounds["bgm_results"].currentTime = 0; controller.restartSong(); }); diff --git a/src/js/view.js b/src/js/view.js index d1f25fb..9da4d33 100644 --- a/src/js/view.js +++ b/src/js/view.js @@ -1,4 +1,4 @@ -function View(controller, bg){ +function View(controller, bg, title){ var _this = this; var _canvas = document.getElementById('canvas'); @@ -56,10 +56,14 @@ function View(controller, bg){ var _currentBigDonFace=1; var _nextBeat=0; + + var _songTitle = title; this.run = function(){ _ctx.font = _mainFont; _this.setBackground(); + + $('.game-song').attr('alt', _songTitle).html(_songTitle); _this.refresh(); } diff --git a/src/views/game.html b/src/views/game.html index 5667a36..1d5d3ff 100644 --- a/src/views/game.html +++ b/src/views/game.html @@ -1,4 +1,5 @@
+