add thanks

This commit is contained in:
Vick Scarlet
2021-11-28 13:17:41 +08:00
parent e1e2ab4701
commit 0e272ffd99
12 changed files with 388 additions and 116 deletions

View File

@ -1,37 +0,0 @@
{
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":1,
"props":{"width":1125,"sceneColor":"#000000","runtime":"ViewBase","height":2436},
"nodeParent":-1,
"label":"View",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":1,
"child":[
{
"x":15,
"type":"Button",
"props":{"y":200,"var":"btnBack","skin":"images/button/button_back@3x.png","name":"btnBack","left":30},
"nodeParent":1,
"label":"Button(btnBack)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":2,
"child":[
]
}],
"animations":[
{
"nodes":[
],
"name":"ani1",
"id":1,
"frameRate":24,
"action":0
}]
}

View File

@ -2,8 +2,8 @@
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":3,
"props":{"width":1125,"sceneColor":"#000000","runtime":"ViewBase","height":2436},
"selecteID":161,
"props":{"width":1125,"sceneColor":"#666666","runtime":"ViewBase","height":2436},
"nodeParent":-1,
"label":"View",
"isOpen":true,
@ -15,24 +15,164 @@
{
"x":15,
"type":"Box",
"props":{"width":260,"var":"btnBack","top":50,"runtime":"ColorfulBox","right":50,"name":"btnBack","height":90,"anchorY":0.5,"anchorX":0.5},
"props":{"y":95,"x":945,"width":260,"var":"btnBack","top":50,"runtime":"ColorfulBox","right":50,"name":"btnBack","height":90,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnBack)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":3,
"compId":153,
"child":[
{
"type":"Label",
"props":{"y":1028,"x":332,"text":"UI_Back","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0},
"nodeParent":3,
"nodeParent":153,
"label":"Label(label)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":4,
"compId":154,
"child":[
]
}]
},
{
"x":15,
"type":"Panel",
"props":{"width":1100,"var":"panelTopSupports","vScrollBarSkin":" ","top":170,"name":"panelTopSupports","height":400,"centerX":0},
"nodeParent":1,
"label":"Panel(panelTopSupports)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":18,
"child":[
{
"type":"VBox",
"props":{"y":15,"var":"vboxTopSupports","space":30,"right":-6,"name":"vboxTopSupports","left":-6},
"nodeParent":18,
"label":"VBox(vboxTopSupports)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":17,
"child":[
{
"type":"Box",
"props":{"runtime":"ColorfulBox","right":0,"name":"boxTopSupport","left":0},
"nodeParent":17,
"label":"Box(boxTopSupport)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":88,
"child":[
{
"type":"Label",
"props":{"y":25,"wordWrap":true,"width":250,"text":"Sombody","name":"name","left":50,"leading":25,"fontSize":50,"font":"SimHei","color":"#000000","align":"center"},
"nodeParent":88,
"label":"Label(name)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":155,
"child":[
]
},
{
"type":"Label",
"props":{"y":25,"wordWrap":true,"text":"This is he say","right":20,"name":"comment","left":350,"leading":25,"fontSize":50,"font":"SimHei","color":"#000000","align":"center"},
"nodeParent":88,
"label":"Label(comment)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":95,
"child":[
]
}]
}]
}],
"$HIDDEN":false
},
{
"x":15,
"type":"List",
"props":{"width":1100,"var":"listSupports","vScrollBarSkin":" ","top":600,"spaceY":50,"spaceX":50,"name":"listSupports","centerX":0,"bottom":200},
"nodeParent":1,
"label":"List(listSupports)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":161,
"child":[
{
"x":30,
"type":"Label",
"props":{"y":30,"x":25,"width":500,"text":"label","renderType":"render","fontSize":50,"font":"SimHei","color":"#ffffff","align":"center"},
"nodeParent":161,
"label":"Label",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":162,
"child":[
]
}]
},
{
"x":15,
"type":"Box",
"props":{"width":400,"var":"btnDDF","runtime":"ColorfulBox","name":"btnDDF","height":100,"centerX":300,"bottom":50,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnDDF)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":163,
"child":[
{
"x":30,
"type":"Label",
"props":{"y":1028,"x":332,"text":"UI_Support_Programmer","name":"label","fontSize":45,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0},
"nodeParent":163,
"label":"Label(label)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":164,
"child":[
]
}]
},
{
"x":15,
"type":"Box",
"props":{"width":400,"var":"btnAFD","runtime":"ColorfulBox","name":"btnAFD","height":100,"centerX":-300,"bottom":50,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnAFD)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":165,
"child":[
{
"x":30,
"type":"Label",
"props":{"y":1028,"x":332,"text":"UI_Support_Designer","name":"label","fontSize":45,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0},
"nodeParent":165,
"label":"Label(label)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":166,
"child":[
]
}]

View File

@ -1,8 +1,8 @@
{
"x":0,
"type":"View",
"selectedBox":18,
"selecteID":17,
"selectedBox":1,
"selecteID":102,
"props":{"width":1125,"sceneColor":"#000000","runtime":"ViewBase","height":2436},
"nodeParent":-1,
"label":"View",
@ -15,7 +15,7 @@
{
"x":15,
"type":"Box",
"props":{"top":80,"right":20,"left":20,"height":180},
"props":{"top":80,"right":20,"left":20,"height":120},
"nodeParent":1,
"label":"Box",
"isOpen":false,
@ -37,7 +37,7 @@
"child":[
{
"type":"Box",
"props":{"x":0,"width":200,"runtime":"ColorfulBox","name":"propertyBox","height":180,"centerY":0},
"props":{"x":0,"width":200,"runtime":"ColorfulBox","name":"propertyBox","height":120,"centerY":0},
"nodeParent":71,
"label":"Box(propertyBox)",
"isOpen":true,
@ -48,7 +48,7 @@
"child":[
{
"type":"Label",
"props":{"y":45,"text":"UI_Property_Charm","name":"label","fontSize":60,"font":"SimHei","color":"#ffffff","centerX":0,"anchorY":0.5,"anchorX":0.5},
"props":{"y":30,"text":"UI_Property_Charm","name":"label","fontSize":45,"font":"SimHei","color":"#ffffff","centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":34,
"label":"Label(label)",
"isDirectory":false,
@ -60,7 +60,7 @@
},
{
"type":"Box",
"props":{"runtime":"ColorfulBox","right":0,"name":"propertyValue","left":0,"height":90,"bottom":0},
"props":{"runtime":"ColorfulBox","right":0,"name":"propertyValue","left":0,"height":60,"bottom":0},
"nodeParent":34,
"label":"Box(propertyValue)",
"isOpen":true,
@ -71,7 +71,7 @@
"child":[
{
"type":"Label",
"props":{"y":45,"var":"labCharm","text":"10","name":"label","fontSize":60,"font":"SimHei","color":"#55fffe","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"props":{"var":"labCharm","text":"10","name":"label","fontSize":55,"font":"SimHei","color":"#55fffe","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":41,
"label":"Label(labCharm)",
"isDirectory":false,
@ -86,7 +86,7 @@
},
{
"type":"Box",
"props":{"x":1,"width":200,"runtime":"ColorfulBox","name":"propertyBox","height":180,"centerY":0},
"props":{"x":1,"width":200,"runtime":"ColorfulBox","name":"propertyBox","height":120,"centerY":0},
"nodeParent":71,
"label":"Box(propertyBox)",
"isOpen":true,
@ -97,7 +97,7 @@
"child":[
{
"type":"Label",
"props":{"y":45,"text":"UI_Property_Intelligence","name":"label","fontSize":60,"font":"SimHei","color":"#ffffff","centerX":0,"anchorY":0.5,"anchorX":0.5},
"props":{"y":30,"text":"UI_Property_Intelligence","name":"label","fontSize":45,"font":"SimHei","color":"#ffffff","centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":50,
"label":"Label(label)",
"isDirectory":false,
@ -109,7 +109,7 @@
},
{
"type":"Box",
"props":{"runtime":"ColorfulBox","right":0,"name":"propertyValue","left":0,"height":90,"bottom":0},
"props":{"runtime":"ColorfulBox","right":0,"name":"propertyValue","left":0,"height":60,"bottom":0},
"nodeParent":50,
"label":"Box(propertyValue)",
"isOpen":true,
@ -120,7 +120,7 @@
"child":[
{
"type":"Label",
"props":{"y":41,"var":"labIntelligence","text":"10","name":"label","fontSize":60,"font":"SimHei","color":"#55fffe","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"props":{"var":"labIntelligence","text":"10","name":"label","fontSize":55,"font":"SimHei","color":"#55fffe","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":55,
"label":"Label(labIntelligence)",
"isDirectory":false,
@ -135,7 +135,7 @@
},
{
"type":"Box",
"props":{"x":2,"width":200,"runtime":"ColorfulBox","name":"propertyBox","height":180,"centerY":0},
"props":{"x":2,"width":200,"runtime":"ColorfulBox","name":"propertyBox","height":120,"centerY":0},
"nodeParent":71,
"label":"Box(propertyBox)",
"isOpen":true,
@ -146,7 +146,7 @@
"child":[
{
"type":"Label",
"props":{"y":45,"text":"UI_Property_Strength","name":"label","fontSize":60,"font":"SimHei","color":"#ffffff","centerX":0,"anchorY":0.5,"anchorX":0.5},
"props":{"y":30,"text":"UI_Property_Strength","name":"label","fontSize":45,"font":"SimHei","color":"#ffffff","centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":74,
"label":"Label(label)",
"isDirectory":false,
@ -158,7 +158,7 @@
},
{
"type":"Box",
"props":{"runtime":"ColorfulBox","right":0,"name":"propertyValue","left":0,"height":90,"bottom":0},
"props":{"runtime":"ColorfulBox","right":0,"name":"propertyValue","left":0,"height":60,"bottom":0},
"nodeParent":74,
"label":"Box(propertyValue)",
"isOpen":true,
@ -169,7 +169,7 @@
"child":[
{
"type":"Label",
"props":{"y":41,"var":"labStrength","text":"10","name":"label","fontSize":60,"font":"SimHei","color":"#55fffe","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"props":{"var":"labStrength","text":"10","name":"label","fontSize":55,"font":"SimHei","color":"#55fffe","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":79,
"label":"Label(labStrength)",
"isDirectory":false,
@ -183,7 +183,7 @@
},
{
"type":"Box",
"props":{"x":3,"width":200,"runtime":"ColorfulBox","name":"propertyBox","height":180,"centerY":0},
"props":{"x":3,"width":200,"runtime":"ColorfulBox","name":"propertyBox","height":120,"centerY":0},
"nodeParent":71,
"label":"Box(propertyBox)",
"isOpen":true,
@ -194,7 +194,7 @@
"child":[
{
"type":"Label",
"props":{"y":45,"text":"UI_Property_Money","name":"label","fontSize":60,"font":"SimHei","color":"#ffffff","centerX":0,"anchorY":0.5,"anchorX":0.5},
"props":{"y":30,"text":"UI_Property_Money","name":"label","fontSize":45,"font":"SimHei","color":"#ffffff","centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":43,
"label":"Label(label)",
"isDirectory":false,
@ -206,7 +206,7 @@
},
{
"type":"Box",
"props":{"runtime":"ColorfulBox","right":0,"name":"propertyValue","left":0,"height":90,"bottom":0},
"props":{"runtime":"ColorfulBox","right":0,"name":"propertyValue","left":0,"height":60,"bottom":0},
"nodeParent":43,
"label":"Box(propertyValue)",
"isOpen":true,
@ -217,7 +217,7 @@
"child":[
{
"type":"Label",
"props":{"y":41,"var":"labMoney","text":"10","name":"label","fontSize":60,"font":"SimHei","color":"#55fffe","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"props":{"var":"labMoney","text":"10","name":"label","fontSize":55,"font":"SimHei","color":"#55fffe","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":48,
"label":"Label(labMoney)",
"isDirectory":false,
@ -231,7 +231,7 @@
},
{
"type":"Box",
"props":{"x":4,"width":200,"runtime":"ColorfulBox","name":"propertyBox","height":180,"centerY":0},
"props":{"x":4,"width":200,"runtime":"ColorfulBox","name":"propertyBox","height":120,"centerY":0},
"nodeParent":71,
"label":"Box(propertyBox)",
"isOpen":true,
@ -242,7 +242,7 @@
"child":[
{
"type":"Label",
"props":{"y":45,"text":"UI_Property_Spirit","name":"label","fontSize":60,"font":"SimHei","color":"#ffffff","centerX":0,"anchorY":0.5,"anchorX":0.5},
"props":{"y":30,"text":"UI_Property_Spirit","name":"label","fontSize":45,"font":"SimHei","color":"#ffffff","centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":81,
"label":"Label(label)",
"isDirectory":false,
@ -254,7 +254,7 @@
},
{
"type":"Box",
"props":{"runtime":"ColorfulBox","right":0,"name":"propertyValue","left":0,"height":90,"bottom":0},
"props":{"runtime":"ColorfulBox","right":0,"name":"propertyValue","left":0,"height":60,"bottom":0},
"nodeParent":81,
"label":"Box(propertyValue)",
"isOpen":true,
@ -265,7 +265,7 @@
"child":[
{
"type":"Label",
"props":{"y":41,"var":"labSpirit","text":"10","name":"label","fontSize":60,"font":"SimHei","color":"#55fffe","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"props":{"var":"labSpirit","text":"10","name":"label","fontSize":55,"font":"SimHei","color":"#55fffe","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":86,
"label":"Label(labSpirit)",
"isDirectory":false,
@ -284,7 +284,7 @@
{
"x":15,
"type":"Box",
"props":{"x":20,"var":"boxTrajectory","top":300,"runtime":"ColorfulBox","right":20,"name":"boxTrajectory","left":20,"bottom":250},
"props":{"x":20,"var":"boxTrajectory","top":240,"runtime":"ColorfulBox","right":20,"name":"boxTrajectory","left":20,"bottom":250},
"nodeParent":1,
"label":"Box(boxTrajectory)",
"isOpen":true,
@ -402,13 +402,14 @@
"props":{"right":0,"left":0,"height":1,"bottom":-1},
"nodeParent":1,
"label":"Box",
"isOpen":false,
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":14,
"child":[
{
"x":30,
"type":"Box",
"props":{"width":600,"var":"btnSummary","runtime":"ColorfulBox","name":"btnSummary","height":150,"centerX":0,"bottom":80},
"nodeParent":14,
@ -420,6 +421,7 @@
"compId":151,
"child":[
{
"x":45,
"type":"Label",
"props":{"text":"UI_Goto_Summary","name":"label","fontSize":60,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0},
"nodeParent":151,
@ -433,6 +435,7 @@
}]
},
{
"x":30,
"type":"Box",
"props":{"y":-155,"var":"boxSpeed","runtime":"ColorFilterItem","right":100,"name":"boxSpeed","left":100,"height":150,"anchorY":0.5,"anchorX":0.5},
"nodeParent":14,
@ -444,6 +447,7 @@
"compId":104,
"child":[
{
"x":45,
"type":"ProgressBar",
"props":{"var":"prgSpeed","skin":"images/progress/progress_s.png","right":0,"name":"prgSpeed","left":0,"bottom":0},
"nodeParent":104,
@ -456,6 +460,7 @@
]
},
{
"x":45,
"type":"HScrollBar",
"props":{"var":"scbSpeed","skin":"images/slider/hslider_s.png","right":0,"name":"scbSpeed","min":0,"max":1000,"left":0,"height":60,"bottom":0},
"nodeParent":104,
@ -468,6 +473,7 @@
]
},
{
"x":45,
"type":"Label",
"props":{"text":"UI_Manual","fontSize":50,"color":"#ffffff","bottom":70},
"nodeParent":104,
@ -480,6 +486,7 @@
]
},
{
"x":45,
"type":"Label",
"props":{"text":"UI_Auto","right":0,"fontSize":50,"font":"SimHei","color":"#ffffff","bottom":70},
"nodeParent":104,

View File

@ -20,6 +20,44 @@ class App{
};
#initLaya() {
/**
*...特殊的字符,如泰文,必须重新实现这个类
*/
//class laya.webgl.text.CharSegment
var CharSegment=(function(){
function CharSegment(){
this._sourceStr=null;
}
Laya.class(CharSegment,'laya.webgl.text.CharSegment');
var __proto=CharSegment.prototype;
Laya.imps(__proto,{"laya.webgl.text.ICharSegment":true})
__proto.textToSpit=function(str){
this._sourceStr=str;
var texLen = str.length;
var idx = -1;
this._words = [];
while (++idx < texLen) {
var character = str.charAt(idx);
var code = str.charCodeAt(idx);
if (code >= 0xD800 && code <= 0xDBFF) {
this._words.push(character + str.charAt(++idx));
} else {
this._words.push(character);
}
}
}
__proto.getChar=function(i){
return this._words;
}
__proto.getCharCode=function(i){
return this._words[i].codePointAt(0);
}
__proto.length=function(){
return this._words.length;
}
return CharSegment;
})()
// Laya.init(1125, 2436, Laya.WebGL);
Laya.Config.isAntialias = true;
Laya.init(...this.#fitScreen, Laya.WebGL);
@ -91,7 +129,10 @@ class App{
await this.#setLanguage(language);
await $ui.setLoading(UI.pages.LOADING);
await $ui.switchView(UI.pages.LOADING);
await core.initial(dataSet=>Laya.promises.loader.load(`data/${this.#language}/${dataSet}.json`, null, Laya.Loader.JSON));
await core.initial(
dataSet=>Laya.promises.loader.load(`data/${this.#language}/${dataSet}.json`, null, Laya.Loader.JSON),
dataSet=>Laya.promises.loader.load(`data/${dataSet}.json`, null, Laya.Loader.JSON),
);
await $ui.switchView(UI.pages.MAIN);
}
}

View File

@ -116,6 +116,9 @@ export default ({
UI_Achievement_Count_Judge_Level_4: 'Orange rate Quintuple',
UI_Achievement_Count_Judge_Level_5: 'Orange rate Sextuple',
UI_Support_Programmer: 'Programmer',
UI_Support_Designer: 'Designer',
F_RemakeTimes: 'Remake {0} Times',
F_AchievementCount: 'Achievement {0}',
F_TalentSelection: '{name} ({description})',

View File

@ -116,6 +116,9 @@ export default ({
UI_Achievement_Count_Judge_Level_4: '抽到橙色概率五倍',
UI_Achievement_Count_Judge_Level_5: '抽到橙色概率六倍',
UI_Support_Programmer: '打赏程序(顿顿饭)',
UI_Support_Designer: '打赏策划(爱发电)',
F_RemakeTimes: '已重开{0}次',
F_AchievementCount: '成就达成{0}个',
F_TalentSelection: '{name}{description}',

View File

@ -6,6 +6,8 @@ globalThis.goto = async tag => {
switch(tag) {
case 'github': url = 'https://github.com/VickScarlet/lifeRestart'; break;
case 'discord': url = 'https://discord.gg/U3qrf49NMQ'; break;
case 'sponsor_afd': url = 'https://afdian.net/@LifeRestart'; break;
case 'sponsor_ddf': url = 'https://dun.mianbaoduo.com/@vickscarlet'; break;
}
try {
window.open(url, '_blank');

View File

@ -21,14 +21,17 @@ class Life {
#talentSelectLimit;
#propertyAllocateLimit;
#defaultPropertys;
#specialThanks;
async initial(loadJSON) {
const [age, talents, events, achievements] = await Promise.all([
loadJSON('age'),
loadJSON('talents'),
loadJSON('events'),
loadJSON('achievement'),
async initial(i18nLoad, commonLoad) {
const [age, talents, events, achievements, specialThanks] = await Promise.all([
i18nLoad('age'),
i18nLoad('talents'),
i18nLoad('events'),
i18nLoad('achievement'),
commonLoad('specialthanks'),
]);
this.#specialThanks = specialThanks;
const total = {
[this.PropertyTypes.TACEV]: this.#achievement.initial({achievements}),
@ -246,6 +249,7 @@ class Life {
this.#property
)
}
get specialThanks() { return this.#specialThanks; }
}
export default Life;

File diff suppressed because one or more lines are too long

View File

@ -1,6 +0,0 @@
export default class CyberThanks extends CyberThanksUI {
constructor() {
super();
this.btnBack.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.MAIN));
}
}

View File

@ -2,5 +2,58 @@ export default class Thanks extends ThanksUI {
constructor() {
super();
this.btnBack.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.MAIN));
this.listSupports.renderHandler = Laya.Handler.create(this, this.renderSupport, null, false);
this.panelTopSupports.vScrollBar.elasticDistance = 150;
this.listSupports.scrollBar.elasticDistance = 150;
this.btnAFD.on(Laya.Event.CLICK, this, goto, ['sponsor_afd']);
this.btnDDF.on(Laya.Event.CLICK, this, goto, ['sponsor_ddf']);
}
static #createComponent = plugin.extractComponents(Thanks.uiView, ['boxTopSupport']);
#createTopSupportItem() {
const item = Thanks.#createComponent('boxTopSupport');
item.name = item.getChildByName('name');
item.comment = item.getChildByName('comment');
$_.deepMapSet(item, $ui.common.topSupportItem);
return item;
}
#topSupports;
init() {
const supports = [];
this.#topSupports = [];
core.specialThanks
.sort(()=>0.5-Math.random())
.forEach(({group, name, comment, color})=>
group == 2
? supports.push({name, color})
: this.renderTopSupport(name, comment, color)
);
this.listSupports.array = supports;
}
renderTopSupport(name, comment, color) {
const item = this.#createTopSupportItem();
item.name.text = name;
item.comment.text = comment;
item.name.color = color || '#000000';
this.vboxTopSupports.addChild(item);
this.#topSupports.push(item);
this.#topSupports.forEach((item, index) => item.y = index);
}
renderSupport(label) {
const {name, color} = label.dataSource;
label.text = name;
label.color = color || $ui.common.defaultFontColor;
}
close() {
this.#topSupports.forEach(item => {
item.removeSelf();
item.destroy();
});
this.#topSupports = null;
}
}

View File

@ -22,7 +22,7 @@ const cyber = {
[pages.TRAJECTORY]: "cyber/trajectory",
[pages.SUMMARY]: "cyber/summary",
[pages.ACHIEVEMENT]: "cyber/achievement",
[pages.THANKS]: "cyber/thanks",
[pages.THANKS]: "default/thanks",
},
popups: {
[popups.ACHIEVEMENT]: "cyber/popup/achievementPopup",
@ -30,6 +30,13 @@ const cyber = {
configs: {
bgColor: '#04131f',
common: {
topSupportItem: {
defaultColor: '#ffa500',
defaultStroke: '#ffa500',
hoverColor: '#ffc500',
hoverStroke: '#ffa500',
},
defaultFontColor: '#cccccc',
grade: [
'#cccccc',
'#55fffe',
@ -43,6 +50,40 @@ const cyber = {
'#ffce45ff',
],
},
pages: {
[pages.THANKS]: {
vars: {
btnBack: {
defaultColor: '#5865f2',
defaultStroke: '#eeeeee',
defaultLabel: '#eeeeee',
hoverColor: '#1160b0',
hoverStroke: '#eeeeee',
hoverLabel: '#eeeeee',
lineWidth: 0,
radius: 4,
},
btnAFD: {
defaultColor: '#8764de',
defaultStroke: '#8764de',
defaultLabel: '#ffffff',
hoverColor: '#9774ee',
hoverStroke: '#9774ee',
hoverLabel: '#ffffff',
radius: 4,
},
btnDDF: {
defaultColor: '#cc6699',
defaultStroke: '#cc6699',
defaultLabel: '#ffffff',
hoverColor: '#dc76a9',
hoverStroke: '#dc76a9',
hoverLabel: '#ffffff',
radius: 4,
},
},
}
}
}
}
@ -68,15 +109,19 @@ const dark = {
box: {
defaultColor: '#4a5361',
defaultStroke: '#4a5361',
defaultLabel: '#eeeeee',
hoverColor: '#4a5361',
hoverStroke: '#4a5361',
hoverLabel: '#eeeeee',
filters: ()=>[new Laya.GlowFilter("#eeeeee", 8, 0, 0)],
},
ageColor: '#ffffee',
contentColor: '#eeeeee',
},
topSupportItem: {
defaultColor: '#ffa500',
defaultStroke: '#ffa500',
hoverColor: '#ffc500',
hoverStroke: '#ffa500',
},
grade: [
'#cccccc',
'#55fffe',
@ -381,6 +426,24 @@ const dark = {
[pages.THANKS]: {
vars: {
btnBack: 'btn_small',
btnAFD: {
defaultColor: '#8764de',
defaultStroke: '#8764de',
defaultLabel: '#ffffff',
hoverColor: '#9774ee',
hoverStroke: '#9774ee',
hoverLabel: '#ffffff',
radius: 4,
},
btnDDF: {
defaultColor: '#cc6699',
defaultStroke: '#cc6699',
defaultLabel: '#ffffff',
hoverColor: '#dc76a9',
hoverStroke: '#dc76a9',
hoverLabel: '#ffffff',
radius: 4,
},
},
}
},
@ -419,19 +482,17 @@ const light = {
defaultFontColor: '#000000',
trajectoryItem: {
box: {
defaultColor: '#ffffff',
defaultStroke: '#ffffff',
defaultLabel: '#000000',
hoverColor: '#ffffff',
hoverStroke: '#ffffff',
hoverLabel: '#000000',
lineWidth: 0,
radius: 0,
filters: ()=>[new Laya.GlowFilter("#b1b1b1", 8, 0, 0)],
},
ageColor: '#000000',
contentColor: '#000000',
},
topSupportItem: {
defaultColor: '#ffa500',
defaultStroke: '#ffa500',
hoverColor: '#ffc500',
hoverStroke: '#ffa500',
},
grade: [
'#000000',
'#55fffe',
@ -734,6 +795,24 @@ const light = {
[pages.THANKS]: {
vars: {
btnBack: 'btn_small',
btnAFD: {
defaultColor: '#8764de',
defaultStroke: '#8764de',
defaultLabel: '#ffffff',
hoverColor: '#9774ee',
hoverStroke: '#9774ee',
hoverLabel: '#ffffff',
radius: 4,
},
btnDDF: {
defaultColor: '#cc6699',
defaultStroke: '#cc6699',
defaultLabel: '#ffffff',
hoverColor: '#dc76a9',
hoverStroke: '#dc76a9',
hoverLabel: '#ffffff',
radius: 4,
}
},
}
},