Tinylayout if browser.width is smaller than 1000 :)

This commit is contained in:
Ruben Müller 2013-05-02 22:50:08 +02:00
parent 5b366995d1
commit 105422035f
2 changed files with 18 additions and 2 deletions

View file

@ -88,8 +88,25 @@
<script type="text/javascript" src="lib/vendors/jquery-1.9.1.js"></script>
<script type="text/javascript" src="lib/impact/impact.js"></script>
<script type="text/javascript" src="lib/game/main.js"></script>
<script type="text/javascript">
function jqUpdateSize()
{
var width = $(window).width();
var height = $(window).height();
if(width < 1000) {
$('body').addClass('tinyscreen');
} else {
$('body').removeClass('tinyscreen');
}
};
$(document).ready(jqUpdateSize);
$(window).resize(jqUpdateSize);
</script>
</head>
<body class="tinyscreen">
<body>
<div id="header">
<img src="media/layout-gamelogo.png">
</div>

View file

@ -15,7 +15,6 @@ Initial release
## Polish
* Increase points with game length
* Randomness for Y position if ball goes straight for too long
* Change layout on smaller screen sizes
## Nice to have
* Improve the AI intelligence (more randomness)