Permalink
Browse files

Cleaning up game

  • Loading branch information...
Kartik Thakore
Kartik Thakore committed Jan 13, 2014
1 parent c991ef1 commit 48cbe0bcafc0c2969cb56b264b49fd92d70780b6
Showing with 35 additions and 4 deletions.
  1. +11 −4 game.css
  2. +12 −0 game.html
  3. BIN img/backgroundGalaxy.jpg
  4. +12 −0 package.json
View
@@ -1,14 +1,21 @@
body {
background-image: url('img/backgroundGalaxy.jpg');
- background-size: cover;
font-family: 'Helvetica', sans-serif;
- position:absolute;
- width:100%;
- height:100%;
+ position:absolute;
top:0;
right:0;
left:0;
bottom:0;
+ overflow: hidden;
+}
+
+.close {
+ position:absolute;
+ left: 10px;
+ padding: 2px;
+ z-index: 10px;
+ font-family: sans-serif;
+ color: lime;
}
#scoreBoard {
View
@@ -3,8 +3,20 @@
<head>
<link href="game.css" rel="stylesheet" type="text/css">
<script src="libs/jquery-1.10.2.min.js"> </script>
+ <script>
+ if (require) {
+ var gui = require('nw.gui');
+ var win = gui.Window.get();
+
+ $(function() {
+ $closeBtn = $('.close');
+ $closeBtn.on('click', function () {win.close()});
+ });
+ }
+ </script>
</head>
<body>
+ <div class="close">X</div>
<div id="scoreBoard">
<div>High Score: <span id="high score">0</span></div>
<div>Score: <span id="score">0</span></div>
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -0,0 +1,12 @@
+{
+ "name": "Lesson 1! Fight",
+ "main": "game.html",
+ "window": {
+ "frame": false,
+ "width": 640,
+ "height": 480,
+ "toolbar": false,
+ "position": "center",
+ "resizable": false
+ }
+}

0 comments on commit 48cbe0b

Please sign in to comment.