Skip to content

Commit

Permalink
Added node-webkit game window params - Issue #13
Browse files Browse the repository at this point in the history
Game now opens in fullscreen mode with address bar hidden.
  • Loading branch information
petarov committed Feb 11, 2014
1 parent a5a46a7 commit f0a460a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
9 changes: 9 additions & 0 deletions js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ var game = {

onload: function () {

// // Load native UI library
// var gui = require('nw.gui');
// //or global.window.nwDispatcher.requireNwGui() (see https://github.com/rogerwang/node-webkit/issues/707)
// if (gui) {
// // Get the current window
// var win = gui.Window.get();
// win.enterFullscreen();
// }

if (!me.video.init("screen", _Globals.canvas.width, _Globals.canvas.height, false,
me.device.isMobile ? 1.99 : null)) {
console.error("Your browser does not support HTML5 canvas!");
Expand Down
14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Psiral",
"description": "Psiral. A turn-based strategy 2D game with wizards.",
"version": "1.0.0-48",
"version": "1.0.0-51",
"private": true,
"main": "index.html",
"author": {
Expand Down Expand Up @@ -29,5 +29,15 @@
},
"engines": {
"node": ">=0.8"
}
},
"window": {
"title": "Psiral",
"icon": "link.png",
"toolbar": false,
"frame": false,
"min_width": 1024,
"min_height": 768,
"fullscreen": true
},
"chromium-args": "--disable-device-orientation"
}

0 comments on commit f0a460a

Please sign in to comment.