From 9de77c9f21191b94f0defe063d4a3fa8d8986ebc Mon Sep 17 00:00:00 2001 From: juliandescottes Date: Sun, 26 Apr 2015 23:33:49 +0200 Subject: [PATCH] Fix : Add mac os menu (removed with nw > 0.10) --- src/js/app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/app.js b/src/js/app.js index 534f523c..23ea52a8 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -152,6 +152,13 @@ if (pskl.devtools) { pskl.devtools.init(); } + + if (pskl.utils.Environment.detectNodeWebkit() && pskl.utils.UserAgent.isMac) { + var gui = require('nw.gui'); + var mb = new gui.Menu({type:'menubar'}); + mb.createMacBuiltin('Piskel'); + gui.Window.get().menu = mb; + } }, loadPiskel_ : function (serializedPiskel, descriptor, fps) {