Initial commit
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/node_modules/
|
||||
/.vs/
|
14
app/assets/css/styles.css
Normal file
@ -0,0 +1,14 @@
|
||||
@font-face {
|
||||
font-family: ringbearer;
|
||||
src: url('../fonts/ringbearer.ttf');
|
||||
}
|
||||
|
||||
body, html {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
html {
|
||||
background: url(../images/BrownWithWignette.jpg) no-repeat center center fixed;
|
||||
background-size: cover;
|
||||
}
|
BIN
app/assets/fonts/Inconsolata-Bold.ttf
Normal file
BIN
app/assets/fonts/Inconsolata-Regular.ttf
Normal file
BIN
app/assets/fonts/ringbearer.ttf
Normal file
BIN
app/assets/images/BrownWithWignette.jpg
Normal file
After Width: | Height: | Size: 5.9 MiB |
BIN
app/assets/images/WCTextCream.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
app/assets/images/WesterosSealCircle.png
Normal file
After Width: | Height: | Size: 807 KiB |
BIN
app/assets/images/WesterosSealSquare.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
app/assets/images/facebook.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
app/assets/images/reddit.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
app/assets/images/twitter.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
app/assets/images/westeroscraftlogo1.png
Normal file
After Width: | Height: | Size: 606 KiB |
BIN
app/assets/images/westeroscraftlogo2.png
Normal file
After Width: | Height: | Size: 227 KiB |
8
app/assets/js/script.js
Normal file
@ -0,0 +1,8 @@
|
||||
const remote = require('electron').remote;
|
||||
|
||||
document.addEventListener("keydown", function (e) {
|
||||
if (e.keyCode === 123) { // F12
|
||||
var window = remote.getCurrentWindow();
|
||||
window.toggleDevTools();
|
||||
}
|
||||
});
|
13
app/index.html
Normal file
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Westeroscraft Launcher</title>
|
||||
<script src="./assets/js/script.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="./assets/css/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
43
index.js
Normal file
@ -0,0 +1,43 @@
|
||||
const {app, BrowserWindow} = require('electron')
|
||||
const path = require('path')
|
||||
const url = require('url')
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
// be closed automatically when the JavaScript object is garbage collected.
|
||||
let win
|
||||
|
||||
function createWindow() {
|
||||
win = new BrowserWindow({ width: 925, height: 500 })
|
||||
|
||||
win.loadURL(url.format({
|
||||
pathname: path.join(__dirname, 'app', 'index.html'),
|
||||
protocol: 'file:',
|
||||
slashes: true
|
||||
}))
|
||||
|
||||
//Open DevTools, this will be removed on release.
|
||||
win.webContents.openDevTools()
|
||||
win.setMenu(null)
|
||||
|
||||
win.on('closed', () => {
|
||||
win = null
|
||||
})
|
||||
}
|
||||
|
||||
app.on('ready', createWindow);
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
// On macOS it is common for applications and their menu bar
|
||||
// to stay active until the user quits explicitly with Cmd + Q
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
app.on('activate', () => {
|
||||
// On macOS it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (win === null) {
|
||||
createWindow()
|
||||
}
|
||||
})
|
23
package.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "westeroscraftlauncher",
|
||||
"version": "0.0.1",
|
||||
"description": "Custom modded launcher for Westeroscraft",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "electron index.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://gitlab.com/westeroscraft/Active-Electron-Launcher.git"
|
||||
},
|
||||
"author": "TheKraken7, Matan, Nightmare",
|
||||
"license": "AGPL-3.0",
|
||||
"bugs": {
|
||||
"url": "https://gitlab.com/westeroscraft/Active-Electron-Launcher/issues"
|
||||
},
|
||||
"homepage": "https://gitlab.com/westeroscraft/Active-Electron-Launcher#README",
|
||||
"devDependencies": {
|
||||
"electron": "^1.6.5",
|
||||
"mojang": "^0.4.0"
|
||||
}
|
||||
}
|