Commit 9e60cf0f authored by Bui's avatar Bui

aaa

parent f69b0fe3
......@@ -17,6 +17,7 @@
top:0;
left:0;
background:rgba(0,0,0,0.75);
z-index: 5;
}
#pause-menu button{
......
......@@ -54,7 +54,7 @@ html, body{
z-index: 1;
}
.result-song {
.result-song, .game-song {
position: absolute;
right: 0;
font-size: 5vmin;
......
......@@ -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;
......
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();
});
......
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();
}
......
<div id='game'>
<h3 alt="" class="stroke-sub game-song"></h3>
<canvas id='canvas'></canvas>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment