-
-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactoring, to prepare for touchscreen input * Almost done * Everything should work * Last fixes and adjustments
- Loading branch information
1 parent
c261af6
commit 75aab63
Showing
38 changed files
with
1,558 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,6 @@ testem.log | |
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
Thumbs.db | ||
|
||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
const { | ||
app, | ||
BrowserWindow | ||
} = require("electron"); | ||
|
||
const args = process.argv.slice(1); | ||
const serve = args.some(val => val === '--serve'); | ||
const big = args.some(val => val === '--big-screen') | ||
|
||
let window; | ||
|
||
function createWindow() { | ||
|
||
if(!big) { | ||
window = new BrowserWindow({ | ||
width: serve ? 1000 : 480, | ||
height: 320, | ||
frame: false, | ||
fullscreen: false | ||
}) | ||
} else { | ||
window = new BrowserWindow({ | ||
width: serve ? 1400 : 800, | ||
height: 480, | ||
frame: false, | ||
fullscreen: false | ||
}) | ||
} | ||
|
||
if (serve) { | ||
require('electron-reload')(__dirname, { | ||
electron: require(`${__dirname}/node_modules/electron`) | ||
}); | ||
window.loadURL('http://localhost:4200'); | ||
} else { | ||
window.loadFile('index.html') | ||
} | ||
|
||
if (serve) window.webContents.openDevTools(); | ||
// window.webContents.openDevTools(); | ||
|
||
window.on('closed', () => { | ||
window = null; | ||
}); | ||
|
||
} | ||
|
||
app.on('ready', createWindow) | ||
|
||
app.on("window-all-closed", () => { | ||
if (process.platform !== "darwin") { | ||
app.quit(); | ||
} | ||
}); | ||
|
||
app.on("activate", () => { | ||
if (window === null) { | ||
createWindow(); | ||
} | ||
}); |
Oops, something went wrong.