commit acffbec10055fcc1fe8873f898dcaeba966a2d21 Author: Daniel Scalzi Date: Sat Apr 22 17:20:23 2017 -0400 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fe2313e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/node_modules/ +/.vs/ \ No newline at end of file diff --git a/app/assets/css/styles.css b/app/assets/css/styles.css new file mode 100644 index 0000000..d770c51 --- /dev/null +++ b/app/assets/css/styles.css @@ -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; +} \ No newline at end of file diff --git a/app/assets/fonts/Inconsolata-Bold.ttf b/app/assets/fonts/Inconsolata-Bold.ttf new file mode 100644 index 0000000..809c1f5 Binary files /dev/null and b/app/assets/fonts/Inconsolata-Bold.ttf differ diff --git a/app/assets/fonts/Inconsolata-Regular.ttf b/app/assets/fonts/Inconsolata-Regular.ttf new file mode 100644 index 0000000..fc981ce Binary files /dev/null and b/app/assets/fonts/Inconsolata-Regular.ttf differ diff --git a/app/assets/fonts/ringbearer.ttf b/app/assets/fonts/ringbearer.ttf new file mode 100644 index 0000000..5fb3a09 Binary files /dev/null and b/app/assets/fonts/ringbearer.ttf differ diff --git a/app/assets/images/BrownWithWignette.jpg b/app/assets/images/BrownWithWignette.jpg new file mode 100644 index 0000000..4424f7e Binary files /dev/null and b/app/assets/images/BrownWithWignette.jpg differ diff --git a/app/assets/images/WCTextCream.png b/app/assets/images/WCTextCream.png new file mode 100644 index 0000000..2f69200 Binary files /dev/null and b/app/assets/images/WCTextCream.png differ diff --git a/app/assets/images/WesterosSealCircle.png b/app/assets/images/WesterosSealCircle.png new file mode 100644 index 0000000..8200a7a Binary files /dev/null and b/app/assets/images/WesterosSealCircle.png differ diff --git a/app/assets/images/WesterosSealSquare.png b/app/assets/images/WesterosSealSquare.png new file mode 100644 index 0000000..076018c Binary files /dev/null and b/app/assets/images/WesterosSealSquare.png differ diff --git a/app/assets/images/facebook.png b/app/assets/images/facebook.png new file mode 100644 index 0000000..7615371 Binary files /dev/null and b/app/assets/images/facebook.png differ diff --git a/app/assets/images/reddit.png b/app/assets/images/reddit.png new file mode 100644 index 0000000..bd4ca02 Binary files /dev/null and b/app/assets/images/reddit.png differ diff --git a/app/assets/images/twitter.png b/app/assets/images/twitter.png new file mode 100644 index 0000000..337e0b5 Binary files /dev/null and b/app/assets/images/twitter.png differ diff --git a/app/assets/images/westeroscraftlogo1.png b/app/assets/images/westeroscraftlogo1.png new file mode 100644 index 0000000..828a67e Binary files /dev/null and b/app/assets/images/westeroscraftlogo1.png differ diff --git a/app/assets/images/westeroscraftlogo2.png b/app/assets/images/westeroscraftlogo2.png new file mode 100644 index 0000000..507bf11 Binary files /dev/null and b/app/assets/images/westeroscraftlogo2.png differ diff --git a/app/assets/js/script.js b/app/assets/js/script.js new file mode 100644 index 0000000..3982078 --- /dev/null +++ b/app/assets/js/script.js @@ -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(); + } +}); \ No newline at end of file diff --git a/app/index.html b/app/index.html new file mode 100644 index 0000000..372b60d --- /dev/null +++ b/app/index.html @@ -0,0 +1,13 @@ + + + + + + Westeroscraft Launcher + + + + + + + diff --git a/index.js b/index.js new file mode 100644 index 0000000..0ff43bc --- /dev/null +++ b/index.js @@ -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() + } +}) \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..cad6236 --- /dev/null +++ b/package.json @@ -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" + } +} diff --git a/start.bat b/start.bat new file mode 100644 index 0000000..d18e2e0 --- /dev/null +++ b/start.bat @@ -0,0 +1,2 @@ +npm start +pause \ No newline at end of file