mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-22 07:08:11 +00:00
get banner data
This commit is contained in:
parent
5873603821
commit
82b81bbd6b
@ -1,5 +1,5 @@
|
||||
{
|
||||
"applicationId": "js.grassclipper.app",
|
||||
"version": "0.7.3",
|
||||
"version": "0.7.2",
|
||||
"resourcesURL": "https://github.com/Grasscutters/GrassClipper/releases/latest/download/resources.neu"
|
||||
}
|
@ -1,13 +1,12 @@
|
||||
{
|
||||
"applicationId": "js.grassclipper.app",
|
||||
"version": "0.7.3",
|
||||
"version": "0.7.2",
|
||||
"defaultMode": "window",
|
||||
"port": 0,
|
||||
"documentRoot": "/resources/",
|
||||
"url": "/",
|
||||
"enableServer": true,
|
||||
"enableNativeAPI": true,
|
||||
"tokenSecurity": "one-time",
|
||||
"logging": {
|
||||
"enabled": true,
|
||||
"writeToLogFile": true
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "grassclipper",
|
||||
"version": "0.7.3",
|
||||
"version": "0.7.2",
|
||||
"repository": "https://github.com/Grasscutters/GrassClipper.git",
|
||||
"author": "SpikeHD <spikegdofficial@gmail.com>",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -2,12 +2,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="style/banner.css" />
|
||||
<script src="js/neutralino.js"></script>
|
||||
<script src="../js/neutralino.js"></script>
|
||||
<script src="js/helpers.js"></script>
|
||||
<script src="js/banner_data.js"></script>
|
||||
<script src="js/banner_onload.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="base">
|
||||
<span>Select a banner to use as a base (or select no banner to start from scratch)</span>
|
||||
<span>Select a banner to use as a base:</span>
|
||||
<select id="bannerDefaultSelect">
|
||||
|
||||
</select>
|
||||
|
@ -0,0 +1,3 @@
|
||||
async function fillDefaultBanners() {
|
||||
getBannerData()
|
||||
}
|
5
resources/banner_creator/js/banner_onload.js
Normal file
5
resources/banner_creator/js/banner_onload.js
Normal file
@ -0,0 +1,5 @@
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
fillDefaultBanners()
|
||||
|
||||
console.log('loaded')
|
||||
})
|
22
resources/banner_creator/js/helpers.js
Normal file
22
resources/banner_creator/js/helpers.js
Normal file
@ -0,0 +1,22 @@
|
||||
Neutralino.init()
|
||||
|
||||
const filesystem = Neutralino.filesystem
|
||||
|
||||
async function getBannerData() {
|
||||
const bannerData = await filesystem.readFile('resources/banner_creator/data/banners.txt')
|
||||
const lines = bannerData.split('\n')
|
||||
let bannerObj = {}
|
||||
|
||||
for (const line of lines) {
|
||||
const values = line.split(' ')
|
||||
|
||||
bannerObj[values[0]] = {
|
||||
assetName: values[1],
|
||||
fiveStar: values[2],
|
||||
// The rest are a list of 4 stars
|
||||
fourStars: values.slice(3)
|
||||
}
|
||||
}
|
||||
|
||||
console.log(bannerObj)
|
||||
}
|
@ -3,6 +3,24 @@ html { user-select: none; }
|
||||
body {
|
||||
overflow: hidden;
|
||||
height: 95vh;
|
||||
margin: 0;
|
||||
margin: 5%;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
#base {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column
|
||||
}
|
||||
|
||||
#base span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#base select {
|
||||
display: block;
|
||||
width: 60%;
|
||||
height: 30px;
|
||||
margin: 10px auto;
|
||||
}
|
Loading…
Reference in New Issue
Block a user