Initial commit

legacy
Daniel Scalzi 2017-04-22 17:20:23 -04:00
commit acffbec100
19 changed files with 105 additions and 0 deletions

2
.gitignore vendored 100644
View File

@ -0,0 +1,2 @@
/node_modules/
/.vs/

View 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;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

View 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 100644
View 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 100644
View 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 100644
View 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"
}
}

2
start.bat 100644
View File

@ -0,0 +1,2 @@
npm start
pause