mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-04-10 01:40:27 +08:00
add event grade
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -60,6 +60,7 @@ export default class CyberTrajectory extends ui.view.CyberTheme.CyberTrajectoryU
|
||||
const item = CyberTrajectory.#createComponent('boxTrajectoryItem');
|
||||
item.labContent = item.getChildByName('labContent');
|
||||
item.labAge = item.getChildByName('hboxAge').getChildByName('labAge');
|
||||
item.boxGrade = item.getChildByName('boxGrade');
|
||||
return item;
|
||||
}
|
||||
#isEnd;
|
||||
@@ -134,6 +135,10 @@ export default class CyberTrajectory extends ui.view.CyberTheme.CyberTrajectoryU
|
||||
}
|
||||
}
|
||||
).join('\n');
|
||||
$_.deepMapSet(
|
||||
item.boxGrade,
|
||||
$ui.common.gradeBlk[content[content.length - 1].grade || 0]
|
||||
);
|
||||
this.vboxTrajectory.addChild(item);
|
||||
this.#trajectoryItems.push(item);
|
||||
this.#trajectoryItems.forEach((item, index) => item.y = index);
|
||||
|
||||
@@ -35,6 +35,9 @@ export default class Trajectory extends ui.view.DefaultTheme.TrajectoryUI {
|
||||
item.labAge = item.getChildByName('hboxAge').getChildByName('labAge');
|
||||
const config = $ui.common.trajectoryItem;
|
||||
$_.deepMapSet(item, config.box);
|
||||
item.grade = grade => {
|
||||
$_.deepMapSet(item, config.grade[grade || 0]);
|
||||
}
|
||||
item.getChildByName('hboxAge')._childs.forEach(child => child.color = config.ageColor);
|
||||
item.labContent.color = config.contentColor;
|
||||
return item;
|
||||
@@ -111,6 +114,7 @@ export default class Trajectory extends ui.view.DefaultTheme.TrajectoryUI {
|
||||
}
|
||||
}
|
||||
).join('\n');
|
||||
item.grade(content[content.length - 1].grade);
|
||||
this.vboxTrajectory.addChild(item);
|
||||
this.#trajectoryItems.push(item);
|
||||
this.#trajectoryItems.forEach((item, index) => item.y = index);
|
||||
|
||||
@@ -55,6 +55,24 @@ const cyber = {
|
||||
'#b17cffff',
|
||||
'#ffce45ff',
|
||||
],
|
||||
gradeBlk: [
|
||||
{
|
||||
defaultColor: '#cccccc',
|
||||
hoverColor: '#cccccc',
|
||||
},
|
||||
{
|
||||
defaultColor: '#55fffe',
|
||||
hoverColor: '#55fffe',
|
||||
},
|
||||
{
|
||||
defaultColor: '#b17cff',
|
||||
hoverColor: '#b17cff',
|
||||
},
|
||||
{
|
||||
defaultColor: '#ffce45',
|
||||
hoverColor: '#ffce45',
|
||||
},
|
||||
]
|
||||
},
|
||||
pages: {
|
||||
[pages.MAIN]: {
|
||||
@@ -183,12 +201,26 @@ const dark = {
|
||||
defaultFontColor: '#eeeeee',
|
||||
trajectoryItem: {
|
||||
box: {
|
||||
defaultColor: '#4a5361',
|
||||
defaultStroke: '#4a5361',
|
||||
hoverColor: '#4a5361',
|
||||
hoverStroke: '#4a5361',
|
||||
filters: ()=>[new Laya.GlowFilter("#eeeeee", 8, 0, 0)],
|
||||
},
|
||||
grade: [
|
||||
{
|
||||
defaultColor: '#4a5361',
|
||||
hoverColor: '#4a5361',
|
||||
},
|
||||
{
|
||||
defaultColor: '#1160b0',
|
||||
hoverColor: '#1160b0',
|
||||
},
|
||||
{
|
||||
defaultColor: '#9379ca',
|
||||
hoverColor: '#9379ca',
|
||||
},
|
||||
{
|
||||
defaultColor: '#ab6157',
|
||||
hoverColor: '#ab6157',
|
||||
},
|
||||
],
|
||||
ageColor: '#ffffee',
|
||||
contentColor: '#eeeeee',
|
||||
},
|
||||
@@ -625,6 +657,21 @@ const light = {
|
||||
box: {
|
||||
filters: ()=>[new Laya.GlowFilter("#b1b1b1", 8, 0, 0)],
|
||||
},
|
||||
grade: [
|
||||
{},
|
||||
{
|
||||
defaultColor: '#55fffe',
|
||||
hoverColor: '#55fffe',
|
||||
},
|
||||
{
|
||||
defaultColor: '#b17cff',
|
||||
hoverColor: '#b17cff',
|
||||
},
|
||||
{
|
||||
defaultColor: '#ffce45',
|
||||
hoverColor: '#ffce45',
|
||||
},
|
||||
],
|
||||
ageColor: '#000000',
|
||||
contentColor: '#000000',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user