4
0
mirror of https://github.com/AltarikMC/Launcher synced 2024-11-22 06:19:50 +01:00
Launcher/main.js

36 lines
654 B
JavaScript
Raw Normal View History

2020-12-05 21:08:32 +01:00
const { app, BrowserWindow, Menu } = require('electron')
const path = require('path');
const iconPath = path.join(__dirname, "icon.png");
2020-12-05 21:08:32 +01:00
function createWindow () {
const win = new BrowserWindow({
width: 1000,
2020-12-05 21:08:32 +01:00
height: 600,
icon: iconPath,
2020-12-05 21:08:32 +01:00
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
},
frame: false
})
//Menu.setApplicationMenu(null)
2020-12-05 21:08:32 +01:00
win.loadFile('index.html')
}
app.whenReady().then(() => {
createWindow()
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
if (win === null){
createWindow()
}
})