OMG graphics!!

This commit is contained in:
Gwenhael Le Moine 2011-07-06 22:47:58 +02:00
parent 469cae4bc1
commit 3c79be7be4
2 changed files with 10 additions and 8 deletions

View file

@ -1,9 +1,11 @@
#blackboard{width:16em;background:#333;float:left}
.starcell{width:1em;height:1em;display:block;float:left;text-align:center}
#blackboard{width:320px;height:180px;background:#333;float:left}
.starcell{width:20px;height:20px;display:block;float:left;text-align:center}
.selected{font-weight:bold}
.wall{color:#000}
.ball{color:#99f}
.cube{color:red}
.gift{color:yellow}
.void{}
.wall{background-image:url(../themes/HP48/tex_wall.png);color:#000}
.ball{background-image:url(../themes/HP48/tex_ball.png);color:#99f}
.cube{background-image:url(../themes/HP48/tex_cube.png);color:red}
.ball_selected{background-image:url(../themes/HP48/tex_ball_selected.png);color:#99f}
.cube_selected{background-image:url(../themes/HP48/tex_cube_selected.png);color:red}
.gift{background-image:url(../themes/HP48/tex_gift.png);color:yellow}
.void{background-image:url(../themes/HP48/tex_empty.png);}
.selected{background:#555}

View file

@ -118,7 +118,7 @@ function format_level( state ) {
'H': '<span class="starcell cube">H</span>',
'@': '<span class="starcell ball">@</span>'
};
substitutions[ state.moving ] = substitutions[ state.moving ].replace( '">', ' selected">' );
substitutions[ state.moving ] = substitutions[ state.moving ].replace( '">', '_selected">' );
var myReplacer = Replacer( substitutions );
return myReplacer( state.board );
}