This commit is contained in:
Bui 2018-08-06 16:34:59 +01:00
parent f69b0fe38a
commit 9e60cf0fee
6 changed files with 12 additions and 5 deletions

View File

@ -17,6 +17,7 @@
top:0;
left:0;
background:rgba(0,0,0,0.75);
z-index: 5;
}
#pause-menu button{

View File

@ -54,7 +54,7 @@ html, body{
z-index: 1;
}
.result-song {
.result-song, .game-song {
position: absolute;
right: 0;
font-size: 5vmin;

View File

@ -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;

View File

@ -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();
});

View File

@ -1,4 +1,4 @@
function View(controller, bg){
function View(controller, bg, title){
var _this = this;
var _canvas = document.getElementById('canvas');
@ -57,9 +57,13 @@ function View(controller, bg){
var _nextBeat=0;
var _songTitle = title;
this.run = function(){
_ctx.font = _mainFont;
_this.setBackground();
$('.game-song').attr('alt', _songTitle).html(_songTitle);
_this.refresh();
}

View File

@ -1,4 +1,5 @@
<div id='game'>
<h3 alt="" class="stroke-sub game-song"></h3>
<canvas id='canvas'></canvas>