Optimizations for dynamic background, pinned background to image 0 for development of the UI, tweaked menu button css.
This commit is contained in:
3
index.js
3
index.js
@@ -1,6 +1,7 @@
|
||||
const {app, BrowserWindow} = require('electron')
|
||||
const path = require('path')
|
||||
const url = require('url')
|
||||
const fs = require('fs')
|
||||
const ejse = require('ejs-electron')
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
@@ -10,6 +11,8 @@ let win
|
||||
function createWindow() {
|
||||
win = new BrowserWindow({ width: 980, height: 552, icon: getPlatformIcon('WesterosSealSquare'), frame: false})
|
||||
|
||||
ejse.data('bkid', Math.floor((Math.random() * fs.readdirSync('app/assets/images/backgrounds').length)))
|
||||
|
||||
win.loadURL(url.format({
|
||||
pathname: path.join(__dirname, 'app', 'index.ejs'),
|
||||
protocol: 'file:',
|
||||
|
||||
Reference in New Issue
Block a user