save load
This commit is contained in:
Vick Scarlet
2022-01-25 21:27:29 +08:00
parent 286828abe7
commit 8d71b73e94
29 changed files with 260 additions and 48 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,8 +2,8 @@
"x":0,
"type":"Dialog",
"selectedBox":1,
"selecteID":15,
"props":{"width":645,"sceneColor":"#000000","height":250},
"selecteID":25,
"props":{"width":645,"sceneColor":"#000000","height":400},
"nodeParent":-1,
"label":"Dialog",
"isOpen":true,
@ -15,17 +15,16 @@
{
"x":15,
"type":"Box",
"props":{"top":0,"right":0,"left":0,"bottom":150},
"props":{"top":0,"right":0,"left":0,"bottom":300},
"nodeParent":1,
"label":"Box",
"isOpen":true,
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":15,
"child":[
{
"x":30,
"type":"Box",
"props":{"y":0,"x":0,"width":645,"height":2},
"nodeParent":15,
@ -50,7 +49,6 @@
}]
},
{
"x":30,
"type":"Box",
"props":{"width":645,"height":2,"centerX":0,"bottom":0},
"nodeParent":15,
@ -75,7 +73,6 @@
}]
},
{
"x":30,
"type":"Box",
"props":{"width":645,"height":100,"centerY":0,"centerX":0,"alpha":0.2},
"nodeParent":15,
@ -87,7 +84,6 @@
"compId":22,
"child":[
{
"x":45,
"type":"Rect",
"props":{"width":645,"lineWidth":1,"height":100,"fillColor":"#000000"},
"nodeParent":22,
@ -104,7 +100,7 @@
{
"x":15,
"type":"TextInput",
"props":{"wordWrap":false,"var":"input","valign":"middle","top":0,"text":"content","right":0,"overflow":"scroll","left":0,"fontSize":35,"font":"SimHei","color":"#ffffff","bottom":150},
"props":{"wordWrap":false,"var":"input","valign":"middle","top":0,"text":"content","right":0,"overflow":"scroll","left":0,"fontSize":35,"font":"SimHei","color":"#ffffff","bottom":300},
"nodeParent":1,
"label":"TextInput(input)",
"isDirectory":false,
@ -117,7 +113,7 @@
{
"x":15,
"type":"Box",
"props":{"width":120,"var":"btnSave","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":5,"height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},
"props":{"width":120,"var":"btnSave","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":5,"height":120,"bottom":155,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnSave)",
"isOpen":false,
@ -142,7 +138,7 @@
{
"x":15,
"type":"Box",
"props":{"width":120,"var":"btnLoad","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":130,"height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},
"props":{"width":120,"var":"btnLoad","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":130,"height":120,"bottom":155,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnLoad)",
"isOpen":false,
@ -167,7 +163,7 @@
{
"x":15,
"type":"Box",
"props":{"y":335,"width":120,"var":"btnRead","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":260,"height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},
"props":{"width":120,"var":"btnRead","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":260,"height":120,"bottom":155,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnRead)",
"isOpen":false,
@ -192,7 +188,7 @@
{
"x":15,
"type":"Box",
"props":{"y":335,"width":120,"var":"btnWrite","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":390,"height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},
"props":{"width":120,"var":"btnWrite","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":390,"height":120,"bottom":155,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnWrite)",
"isOpen":false,
@ -217,7 +213,7 @@
{
"x":15,
"type":"Box",
"props":{"y":10,"x":10,"width":120,"var":"btnClose","runtime":"Laya.runtime.ColorfulBox","right":5,"name":"btnSmall","height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},
"props":{"x":10,"width":120,"var":"btnClose","runtime":"Laya.runtime.ColorfulBox","right":5,"name":"btnSmall","height":120,"bottom":155,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnClose)",
"isOpen":false,
@ -238,6 +234,32 @@
"child":[
]
}]
},
{
"x":15,
"type":"Box",
"props":{"y":20,"var":"btnBackup","runtime":"Laya.runtime.ColorfulBox","right":5,"name":"btnBackup","left":5,"height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnBackup)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":25,
"child":[
{
"x":30,
"type":"Label",
"props":{"text":"UI_BackupBtn","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5},
"nodeParent":25,
"label":"Label(label)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":26,
"child":[
]
}]
}],
"animations":[
{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
public/chunk/33.007ad.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,9 @@
},
"NoRandom": 1,
"branch": [
"TLT?[2024]:11504"
"(TLT?[1148])&(EVT![20001]):20001",
"(TLT?[1147])&(EVT![20000]):20000",
"(TLT?[2024])&(EVT?[10679,10680,10681])&(EVT![11504]):11504"
]
},
"10001": {
@ -11366,6 +11368,25 @@
"11504": {
"id": 11504,
"event": "因为得过诺贝尔奖,你被复活了。",
"grade": 3,
"effect": {
"LIF": 1
},
"NoRandom": 1
},
"20000": {
"id": 20000,
"event": "天赋卡【死者苏生】发动,你被复活了。",
"grade": 3,
"effect": {
"LIF": 1
},
"NoRandom": 1
},
"20001": {
"id": 20001,
"event": "因为和恶魔进行过交易,你复活了。",
"grade": 3,
"effect": {
"LIF": 1
},

View File

@ -1332,6 +1332,25 @@
]
}
},
"1147": {
"id": 1147,
"name": "死者苏生",
"description": "加一条命",
"grade": 3
},
"1148": {
"id": 1148,
"name": "恶魔的交易",
"description": "所有属性-2加一条命",
"grade": 2,
"effect": {
"SPR": -2,
"MNY": -2,
"CHR": -2,
"STR": -2,
"INT": -2
}
},
"2001": {
"id": 2001,
"name": "霸王",

View File

@ -7,7 +7,9 @@
},
"NoRandom": 1,
"branch": [
"TLT?[2024]:11504"
"(TLT?[1148])&(EVT![20001]):20001",
"(TLT?[1147])&(EVT![20000]):20000",
"(TLT?[2024])&(EVT?[10679,10680,10681])&(EVT![11504]):11504"
]
},
"10001": {
@ -11366,6 +11368,25 @@
"11504": {
"id": 11504,
"event": "因为得过诺贝尔奖,你被复活了。",
"grade": 3,
"effect": {
"LIF": 1
},
"NoRandom": 1
},
"20000": {
"id": 20000,
"event": "天赋卡【死者苏生】发动,你被复活了。",
"grade": 3,
"effect": {
"LIF": 1
},
"NoRandom": 1
},
"20001": {
"id": 20001,
"event": "因为和恶魔进行过交易,你复活了。",
"grade": 3,
"effect": {
"LIF": 1
},

View File

@ -1332,6 +1332,25 @@
]
}
},
"1147": {
"id": 1147,
"name": "死者苏生",
"description": "加一条命",
"grade": 3
},
"1148": {
"id": 1148,
"name": "恶魔的交易",
"description": "所有属性-2加一条命",
"grade": 2,
"effect": {
"SPR": -2,
"MNY": -2,
"CHR": -2,
"STR": -2,
"INT": -2
}
},
"2001": {
"id": 2001,
"name": "霸王",

View File

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><meta name="description" content="やり直すんだ。そして、次はうまくやる。"/><meta name="keywords" content="人生重开模拟器 liferestart life restart remake 人生重来"/><meta name="renderer" content="webkit"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="full-screen" content="true"/><meta name="x5-fullscreen" content="true"/><meta name="360-fullscreen" content="true"/><meta name="theme-color" content="#157878"/><meta name="laya" screenorientation="landscape"/><meta http-equiv="expires" content="0"/><meta http-equiv="Cache-Control" content="no-siteapp"/><title>Life Restart</title><script src="libs/laya/min/laya.core.min.js"></script><script src="libs/laya/min/laya.webgl.min.js"></script><script src="libs/laya/min/laya.filter.min.js"></script><script src="libs/laya/min/laya.particle.min.js"></script><script src="libs/laya/min/laya.ui.min.js"></script><script defer="defer" src="chunk/main.98d95.js"></script></head><body style="background:black"></body></html>
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><meta name="description" content="やり直すんだ。そして、次はうまくやる。"/><meta name="keywords" content="人生重开模拟器 liferestart life restart remake 人生重来"/><meta name="renderer" content="webkit"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="full-screen" content="true"/><meta name="x5-fullscreen" content="true"/><meta name="360-fullscreen" content="true"/><meta name="theme-color" content="#157878"/><meta name="laya" screenorientation="landscape"/><meta http-equiv="expires" content="0"/><meta http-equiv="Cache-Control" content="no-siteapp"/><title>Life Restart</title><script src="libs/laya/min/laya.core.min.js"></script><script src="libs/laya/min/laya.webgl.min.js"></script><script src="libs/laya/min/laya.filter.min.js"></script><script src="libs/laya/min/laya.particle.min.js"></script><script src="libs/laya/min/laya.ui.min.js"></script><script defer="defer" src="chunk/main.ba1cc.js"></script></head><body style="background:black"></body></html>

View File

@ -15,6 +15,8 @@ export default ({
UI_Loading: '加载中...',
UI_Error: '错误',
UI_BackupBtn: '上面没有效果就试试这个吧',
UI_Colon: '',
UI_Times: '次',
UI_Count: '个',

View File

@ -648,6 +648,7 @@ var SaveLoadUI=(function(_super){
this.btnRead=null;
this.btnWrite=null;
this.btnClose=null;
this.btnBackup=null;
SaveLoadUI.__super.call(this);
}
@ -662,7 +663,7 @@ var SaveLoadUI=(function(_super){
}
SaveLoadUI.uiView={"type":"Dialog","props":{"width":645,"height":250},"child":[{"type":"Box","props":{"top":0,"right":0,"left":0,"bottom":150},"child":[{"type":"Box","props":{"y":0,"x":0,"width":645,"height":2},"child":[{"type":"Rect","props":{"width":645,"lineWidth":1,"height":2,"fillColor":"#97ffe6"}}]},{"type":"Box","props":{"width":645,"height":2,"centerX":0,"bottom":0},"child":[{"type":"Rect","props":{"width":645,"lineWidth":1,"height":2,"fillColor":"#97ffe6"}}]},{"type":"Box","props":{"width":645,"height":100,"centerY":0,"centerX":0,"alpha":0.2},"child":[{"type":"Rect","props":{"width":645,"lineWidth":1,"height":100,"fillColor":"#000000"}}]}]},{"type":"TextInput","props":{"wordWrap":false,"var":"input","valign":"middle","top":0,"text":"content","right":0,"overflow":"scroll","left":0,"fontSize":35,"font":"SimHei","color":"#ffffff","bottom":150}},{"type":"Box","props":{"width":120,"var":"btnSave","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":5,"height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Label","props":{"text":"UI_Save","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5}}]},{"type":"Box","props":{"width":120,"var":"btnLoad","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":130,"height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Label","props":{"text":"UI_Load","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5}}]},{"type":"Box","props":{"y":335,"width":120,"var":"btnRead","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":260,"height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Label","props":{"text":"UI_Read","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5}}]},{"type":"Box","props":{"y":335,"width":120,"var":"btnWrite","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":390,"height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Label","props":{"text":"UI_Write","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5}}]},{"type":"Box","props":{"y":10,"x":10,"width":120,"var":"btnClose","runtime":"Laya.runtime.ColorfulBox","right":5,"name":"btnSmall","height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Label","props":{"text":"×","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5}}]}]};
SaveLoadUI.uiView={"type":"Dialog","props":{"width":645,"height":400},"child":[{"type":"Box","props":{"top":0,"right":0,"left":0,"bottom":300},"child":[{"type":"Box","props":{"y":0,"x":0,"width":645,"height":2},"child":[{"type":"Rect","props":{"width":645,"lineWidth":1,"height":2,"fillColor":"#97ffe6"}}]},{"type":"Box","props":{"width":645,"height":2,"centerX":0,"bottom":0},"child":[{"type":"Rect","props":{"width":645,"lineWidth":1,"height":2,"fillColor":"#97ffe6"}}]},{"type":"Box","props":{"width":645,"height":100,"centerY":0,"centerX":0,"alpha":0.2},"child":[{"type":"Rect","props":{"width":645,"lineWidth":1,"height":100,"fillColor":"#000000"}}]}]},{"type":"TextInput","props":{"wordWrap":false,"var":"input","valign":"middle","top":0,"text":"content","right":0,"overflow":"scroll","left":0,"fontSize":35,"font":"SimHei","color":"#ffffff","bottom":300}},{"type":"Box","props":{"width":120,"var":"btnSave","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":5,"height":120,"bottom":155,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Label","props":{"text":"UI_Save","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5}}]},{"type":"Box","props":{"width":120,"var":"btnLoad","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":130,"height":120,"bottom":155,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Label","props":{"text":"UI_Load","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5}}]},{"type":"Box","props":{"width":120,"var":"btnRead","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":260,"height":120,"bottom":155,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Label","props":{"text":"UI_Read","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5}}]},{"type":"Box","props":{"width":120,"var":"btnWrite","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":390,"height":120,"bottom":155,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Label","props":{"text":"UI_Write","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5}}]},{"type":"Box","props":{"x":10,"width":120,"var":"btnClose","runtime":"Laya.runtime.ColorfulBox","right":5,"name":"btnSmall","height":120,"bottom":155,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Label","props":{"text":"×","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5}}]},{"type":"Box","props":{"y":20,"var":"btnBackup","runtime":"Laya.runtime.ColorfulBox","right":5,"name":"btnBackup","left":5,"height":120,"bottom":5,"anchorY":0.5,"anchorX":0.5},"child":[{"type":"Label","props":{"text":"UI_BackupBtn","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5}}]}]};
return SaveLoadUI;
})(Dialog);
var ThemesUI=(function(_super){

View File

@ -15,7 +15,13 @@ export default class CyberCelebrity extends ui.view.CyberTheme.CelebrityUI {
const vboxStates = item.getChildByName('vboxStates');
const boxName = item.getChildByName('boxName');
boxName.getChildByName('label').text = name;
vboxStates.getChildByName('label').text = $_.format($lang.F_PropertyStr, property);
const p = $_.clone(property);
for(const k in p)
if(Math.abs(p[k] - Math.PI) < 0.0000001)
p[k] = 'π';
vboxStates.getChildByName('label').text = $_.format($lang.F_PropertyStr, p);
for(const t of talent) {
const i = CyberCelebrity.#createComponent('boxTalent');
i.getChildByName('label').text = $_.format($lang.F_TalentSelection, t);

View File

@ -66,8 +66,10 @@ export default class CyberTrajectory extends ui.view.CyberTheme.CyberTrajectoryU
#isEnd;
#trajectoryItems;
#talents;
#enableExtend;
init({propertyAllocate, talents}) {
init({propertyAllocate, talents, enableExtend}) {
this.#enableExtend = enableExtend;
this.boxParticle.visible = false;
this.boxSpeed.visible = true;
this.btnSummary.visible = false;
@ -147,7 +149,7 @@ export default class CyberTrajectory extends ui.view.CyberTheme.CyberTrajectoryU
onSummary() {
const talents = this.#talents;
$ui.switchView(UI.pages.SUMMARY, {talents});
$ui.switchView(UI.pages.SUMMARY, { talents, enableExtend: this.#enableExtend });
}
get speed() {

View File

@ -16,7 +16,13 @@ export default class Celebrity extends ui.view.DefaultTheme.CelebrityUI {
const vboxStates = item.getChildByName('vboxStates');
const boxName = item.getChildByName('boxName');
boxName.label = name;
vboxStates.label = $_.format($lang.F_PropertyStr, property);
const p = $_.clone(property);
for(const k in p)
if(Math.abs(p[k] - Math.PI) < 0.0000001)
p[k] = 'π';
vboxStates.label = $_.format($lang.F_PropertyStr, p);
$_.deepMapSet(boxName, style.name);
$_.deepMapSet(vboxStates, style.state);
for(const t of talent) {

View File

@ -45,8 +45,10 @@ export default class Trajectory extends ui.view.DefaultTheme.TrajectoryUI {
#isEnd;
#trajectoryItems;
#talents;
#enableExtend;
init({propertyAllocate, talents}) {
init({propertyAllocate, talents, enableExtend}) {
this.#enableExtend = enableExtend;
this.boxParticle.visible = false;
this.boxSpeed.visible = true;
this.btnSummary.visible = false;
@ -123,7 +125,7 @@ export default class Trajectory extends ui.view.DefaultTheme.TrajectoryUI {
onSummary() {
const talents = this.#talents;
$ui.switchView(UI.pages.SUMMARY, {talents});
$ui.switchView(UI.pages.SUMMARY, {talents, enableExtend: this.#enableExtend});
}
get speed() {

View File

@ -60,6 +60,71 @@ export default class SaveLoad extends ui.view.SaveLoadUI {
this.input.on(Laya.Event.MOUSE_DOWN, this, ()=>{
this.input.setSelection(0, this.input.text.length);
})
this.btnBackup.on(Laya.Event.CLICK, this, ()=>{
const board = document.createElement("div");
document.body.appendChild(board);
board.style = `
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0.95`;
const bg = document.createElement("div");
bg.style = `
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #fff;
opacity: 0.95`;
document.body.appendChild(board);
board.appendChild(bg);
const textarea = document.createElement("textarea");
textarea.style = `position: absolute; width: ${window.innerWidth}px; height: ${window.innerHeight}px;`
textarea.value = JSON.stringify(
JSON.parse(this.data),
null,
4
);
board.appendChild(textarea);
const close = document.createElement("div");
close.style = `
position: absolute;
top: 0;
right: 0;
width: 100px;
height: 100px;
background: red;
font-size:100px;
padding: 0;
line-height: 100px;
color: white;
opacity: 0.7`;
close.innerHTML = '×';
board.appendChild(close);
close.onclick = ()=>board.remove();
const load = document.createElement("div");
load.style = `
position: absolute;
bottom: 0;
right: 0;
width: 100px;
height: 100px;
background: limegreen;
font-size: 35px;
padding: 0;
line-height: 50px;
color: white;
opacity: 0.7`;
load.innerHTML = 'LOAD<br>读取';
board.appendChild(load);
load.onclick = ()=>this.data = [textarea.value, '成功/success', '失败/failed', true];
});
}
static load() {
@ -79,17 +144,19 @@ export default class SaveLoad extends ui.view.SaveLoadUI {
return JSON.stringify(data);
}
set data([v, success = 'UI_LoadSuccess', Failed = 'UI_LoadFailed']) {
set data([v, success = 'UI_LoadSuccess', failed = 'UI_LoadFailed', altMsg]) {
try {
const data = JSON.parse(v);
for(const key in data)
localStorage.setItem(key, data[key]);
$$event('message', [success]);
if(altMsg) alert(success);
else $$event('message', [success]);
$ui.theme = $ui.theme;
this.btnClose.event(Laya.Event.CLICK);
} catch (e) {
console.error(e);
$$event('message', [Failed]);
if(altMsg) alert(`${failed}\n${e}`);
else $$event('message', [failed]);
}
}
}

View File

@ -171,6 +171,13 @@ const cyber = {
defaultColor: '#fc5531',
hoverColor: '#f28b54',
},
btnBackup: {
defaultColor: '#9c30cd',
hoverColor: '#bf50fd',
radius: 8,
defaultLabel: '#ffffff',
hoverLabel: '#ffffff',
},
},
names: {
btnSmall: {
@ -216,20 +223,20 @@ const dark = {
},
grade: [
{
defaultColor: '#4a5361',
defaultColor: '#464646',
hoverColor: '#4a5361',
},
{
defaultColor: '#1160b0',
hoverColor: '#1160b0',
defaultColor: '#6495ed',
hoverColor: '#87cefa',
},
{
defaultColor: '#9379ca',
hoverColor: '#9379ca',
defaultColor: '#e2a7ff',
hoverColor: '#e7beff',
},
{
defaultColor: '#ab6157',
hoverColor: '#ab6157',
defaultColor: '#ffa07a',
hoverColor: '#f7a989',
},
],
ageColor: '#ffffee',
@ -639,6 +646,13 @@ const dark = {
defaultColor: '#fc5531',
hoverColor: '#f28b54',
},
btnBackup: {
defaultColor: '#9c30cd',
hoverColor: '#bf50fd',
radius: 8,
defaultLabel: '#ffffff',
hoverLabel: '#ffffff',
},
},
names: {
btnSmall: {
@ -707,18 +721,21 @@ const light = {
lineWidth: 2,
},
grade: [
{},
{
defaultColor: '#55fffe',
hoverColor: '#55fffe',
defaultColor: '#ffffff',
hoverColor: '#ededed',
},
{
defaultColor: '#b17cff',
hoverColor: '#b17cff',
defaultColor: '#87cefa',
hoverColor: '#6495ed',
},
{
defaultColor: '#ffce45',
hoverColor: '#ffce45',
defaultColor: '#e7beff',
hoverColor: '#e2a7ff',
},
{
defaultColor: '#f7a989',
hoverColor: '#ffa07a',
},
],
ageColor: '#000000',
@ -1126,6 +1143,13 @@ const light = {
defaultColor: '#fc5531',
hoverColor: '#f28b54',
},
btnBackup: {
defaultColor: '#9c30cd',
hoverColor: '#bf50fd',
radius: 8,
defaultLabel: '#ffffff',
hoverLabel: '#ffffff',
},
},
names: {
btnSmall: {