Begining work on the UI, header is complete.

legacy
Daniel Scalzi 2017-05-09 00:56:08 -04:00
parent c41f74f478
commit 8173f85df0
8 changed files with 184 additions and 14 deletions

View File

@ -1,9 +1,28 @@
/*******************************************************************************
* *
* Fonts *
* *
******************************************************************************/
/* Primary font for the application, found on http://www.dafont.com/ringbearer.font */
@font-face {
font-family: ringbearer;
src: url('../fonts/ringbearer.ttf');
}
body, html {
/* Logger font, found on https://fonts.google.com/specimen/Inconsolata?selection.family=Inconsolata */
@font-face {
font-family: inconsolata;
src: url('../fonts/Inconsolata-Bold.ttf');
}
/*******************************************************************************
* *
* Body *
* *
******************************************************************************/
body, html, div {
margin: 0px;
padding: 0px;
}
@ -11,4 +30,57 @@ body, html {
html {
background: url('../images/BrownWithWignette.jpg') no-repeat center center fixed;
background-size: cover;
}
/*******************************************************************************
* *
* Header *
* *
******************************************************************************/
/* Main div header container/ */
#header_container {
background-color: black;
padding: 5px;
font-size: 0px;
text-align: center;
border-bottom: thick solid #a02d2a;
border-bottom-width: 5px;
position: relative;
}
/* Div container for the seal image. */
#header_seal_container {
position: absolute;
}
/* Div container for the header image. */
#header_img_container {
display: inline-block;
margin: 0 auto;
}
/* Seal and header images. */
#header_seal,
#header_img {
height: 75px;
width: auto;
display: block;
}
/* Div container for the social buttons */
#header_social_container {
font-size: 16px;
position: absolute;
bottom: 0px;
right: 0px;
margin-right: 5px;
}
/* Social buttons */
.header_social_img {
height: 25px;
width: auto;
display: inline-block;
cursor: pointer;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,75 @@
{
"version": "1.0",
"servers": [
{
"id": "WesterosCraft-1.11.2",
"name": "WesterosCraft Production Client",
"news-feed": "http://www.westeroscraft.com/api/rss.php?preset_id=12700544",
"icon-url": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/server-prod.png",
"revision": "0.0.1",
"server-ip": "mc.westeroscraft.com",
"mc-version": "1.11.2",
"main-class": "TBD",
"libraries": [
{
"name": "net.minecraftforge.forge.forge-universal:1.11.2-13.20.0.2228",
"required": true,
"artifact": {
"size": 4123353,
"MD5": "5b9105f1a8552beac0c8228203d994ae",
"path": "net/minecraftforge/forge/1.11.2-13.20.0.2228/forge-1.11.2-13.20.0.2228-universal.jar",
"url": "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.11.2-13.20.0.2228/forge-1.11.2-13.20.0.2228-universal.jar"
},
"launch-args": ["--tweakClass cpw.mods.fml.common.launcher.FMLTweaker"]
},
{
"name": "net.optifine.optifine:1.11.2_HD_U_B8",
"required": true,
"artifact": {
"size": 2050307,
"MD5": "c18c80f8bfa2a440cc5af4ab8816bc4b",
"path": "optifine/OptiFine/1.11.2_HD_U_B8/OptiFine-1.11.2_HD_U_B8.jar",
"url": "http://optifine.net/download.php?f=OptiFine_1.11.2_HD_U_B8.jar"
},
"launch-args": []
}
],
"forgemods": [
{
"name": "MODNAME",
"required": true,
"artifact": {
"size": 1234,
"MD5": "e71e88c744588fdad48d3b3beb4935fc",
"path": "/path/to/lib/modname.jar",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/1.7.10/launchwrapper-1.11.jar"
}
}
],
"litemods": [
{
"name": "MODNAME",
"required": true,
"artifact": {
"size": 1234,
"MD5": "e71e88c744588fdad48d3b3beb4935fc",
"path": "/path/to/lib/modname.jar",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/1.7.10/launchwrapper-1.11.jar"
}
}
],
"files": [
{
"name": "FILENAME",
"required": true,
"artifact": {
"size": 1234,
"MD5": "e71e88c744588fdad48d3b3beb4935fc",
"path": "/path/to/lib/filename.jar",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/1.7.10/launchwrapper-1.11.jar"
}
}
]
}
]
}

View File

@ -8,15 +8,13 @@ const unzip = require('unzip')
const mkpath = require('mkdirp');
exports.launchMinecraft = function(versionData, basePath){
const authPromise = mojang.auth('nytrocraft@live.com', 'applesrgood123', uuidV4(), {
const authPromise = mojang.auth('EMAIL', 'PASS', uuidV4(), {
name: 'Minecraft',
version: 1
})
authPromise.then(function(data){
const hardcodedargs = ''
const args = finalizeArguments(versionData, data, basePath)
//console.log(data)
//console.log(args)
//TODO make this dynamic
const child = child_process.spawn('C:\\Program Files\\Java\\jre1.8.0_131\\bin\\javaw.exe', args)
})

View File

@ -1,8 +1,16 @@
var $ = require('jQuery');
const remote = require('electron').remote
const shell = require('electron').shell
//Opens DevTools window if you type "wcdev" in sequence.
//This will crash the program if you are using multiple
//DevTools, for example the chrome debugger in VS Code.
/* Open web links in the user's default browser. */
$(document).on('click', 'a[href^="http"]', function(event) {
event.preventDefault();
shell.openExternal(this.href);
});
/*Opens DevTools window if you type "wcdev" in sequence.
This will crash the program if you are using multiple
DevTools, for example the chrome debugger in VS Code. */
const match = [87, 67, 68, 69, 86]
let at = 0;
@ -30,6 +38,4 @@ document.addEventListener('keydown', function (e) {
window.toggleDevTools()
at = 0
}
})
console.log('Can you see me? ( ͡° ͜ʖ ͡°) Then it\'s working!')
})

View File

@ -8,6 +8,24 @@
<link type="text/css" rel="stylesheet" href="./assets/css/styles.css">
</head>
<body>
<div id="header_container">
<div id="header_seal_container">
<img id="header_seal" src="./assets/images/WesterosSealSquare.png"/>
</div>
<div id="header_img_container">
<img id="header_img" src="./assets/images/WCTextCrop.png" />
</div>
<div id="header_social_container">
<a href="http://facebook.com/westeroscraft" class="header_social_link">
<img src="./assets/images/facebook.png" class="header_social_img" />
</a>
<a href="http://reddit.com/r/westeroscraft" class="header_social_link">
<img src="./assets/images/reddit.png" class="header_social_img" />
</a>
<a href="http://twitter.com/westeroscraft" class="header_social_link">
<img src="./assets/images/twitter.png" class="header_social_img" />
</a>
</div>
</div>
</body>
</html>

View File

@ -17,7 +17,7 @@ function createWindow() {
win.setMenu(null)
//Code for testing, marked for removal one it's properly implemented.
/*//Code for testing, marked for removal one it's properly implemented.
const assetdl = require('./app/assets/js/assetdownload.js')
const basePath = path.join(__dirname, 'mcfiles')
const dataPromise = assetdl.parseVersionData('1.11.2', basePath)
@ -27,7 +27,7 @@ function createWindow() {
//assetdl.downloadLogConfig(data, basePath)
//assetdl.downloadLibraries(data, basePath)
require('./app/assets/js/launchprocess.js').launchMinecraft(data, basePath)
})
})*/
win.on('closed', () => {
win = null

View File

@ -16,10 +16,11 @@
"url": "https://gitlab.com/westeroscraft/electronlauncher/issues"
},
"homepage": "http://www.westeroscraft.com/",
"devDependencies": {
"dependencies": {
"async": "^2.3.0",
"electron": "^1.6.5",
"extract-zip": "=1.6.0",
"jQuery": "^1.7.4",
"mojang": "^0.4.1",
"promise": "^7.1.1",
"unzip": "^0.1.11",