mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-04-09 17:29:03 +08:00
daily update
This commit is contained in:
@@ -37,11 +37,11 @@ export default class Achievement extends AchievementUI {
|
||||
|
||||
this.labRemakeTimes.text = statistics[pt.TMS].value;
|
||||
this.labRemakeTimesJudge.text = statistics[pt.TMS].judge;
|
||||
this.labAchievementCountJudge.color = $ui.gradeColor(statistics[pt.TMS].grade);
|
||||
this.labAchievementCountJudge.color = $ui.common.grade[statistics[pt.TMS].grade];
|
||||
|
||||
this.labAchievementCount.text = statistics[pt.CACHV].value;
|
||||
this.labAchievementCountJudge.text = statistics[pt.CACHV].judge;
|
||||
this.labAchievementCountJudge.color = $ui.gradeColor(statistics[pt.CACHV].grade);
|
||||
this.labAchievementCountJudge.color = $ui.common.grade[statistics[pt.CACHV].grade];
|
||||
|
||||
this.labEventRate.text = parseInt(statistics[pt.REVT].value*100)+'%';
|
||||
this.prgEventRate.value = statistics[pt.REVT].value;
|
||||
|
||||
@@ -8,6 +8,12 @@ export default class Main extends MainUI {
|
||||
this.btnDiscord.on(Laya.Event.CLICK, this, goto, ['discord']);
|
||||
}
|
||||
|
||||
static load() {
|
||||
return [
|
||||
"images/atlas/images/icons.atlas",
|
||||
]
|
||||
}
|
||||
|
||||
init() {
|
||||
this.btnDiscord.visible =
|
||||
this.btnAchievement.visible =
|
||||
|
||||
@@ -8,7 +8,7 @@ export default class achievementPopup extends AchievementPopupUI {
|
||||
Laya.Tween.clearAll(this.boxBg);
|
||||
this.alpha = 0.8;
|
||||
this.labName.text = achievement.name;
|
||||
this.labName.color = $ui.gradeColor(achievement.grade);
|
||||
this.labName.color = $ui.common.grade[achievement.grade];
|
||||
this.x = - this.width;
|
||||
this.boxBg.x = this.boxBg.width;
|
||||
await Promise.all([
|
||||
|
||||
@@ -5,19 +5,9 @@ export default class Talent extends TalentUI {
|
||||
this.btnNext.on(Laya.Event.CLICK, this, this.onClickNext);
|
||||
this.listTalents.renderHandler = Laya.Handler.create(this, this.renderTalent, null, false);
|
||||
this.listTalents.scrollBar.elasticDistance = 150;
|
||||
this.on(Laya.Event.RESIZE, this, () => {
|
||||
const renderWidth = this.listTalents?._itemRender?.props?.width;
|
||||
if(renderWidth) {
|
||||
const col = Math.max(Math.floor((this.width - 40) / renderWidth), 1);
|
||||
this.listTalents.width = col * renderWidth + (col - 1) * (this.listTalents.spaceY || 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#selected = new Set();
|
||||
static load() {
|
||||
return ['images/background/background_2@3x.png'];
|
||||
}
|
||||
|
||||
init() {
|
||||
this.pageDrawCard.visible = true;
|
||||
@@ -46,51 +36,11 @@ export default class Talent extends TalentUI {
|
||||
renderTalent(box, index) {
|
||||
const dataSource = box.dataSource;
|
||||
|
||||
const hboxTitle = box.getChildByName("hboxTitle");
|
||||
const labTitle = hboxTitle.getChildByName("labTitle");
|
||||
const grades = hboxTitle.getChildByName("grades");
|
||||
const grade1 = grades.getChildByName("grade1");
|
||||
const grade2 = grades.getChildByName("grade2");
|
||||
const grade3 = grades.getChildByName("grade3");
|
||||
const labDescription = box.getChildByName("labDescription");
|
||||
const unselected = box.getChildByName("unselected");
|
||||
const selected = box.getChildByName("selected");
|
||||
box.label = `${dataSource.name}(${dataSource.description})`;
|
||||
const style = $ui.common.card[dataSource.grade];
|
||||
|
||||
$_.mapSet(box, this.#selected.has(index)? style.selected: style.normal);
|
||||
|
||||
switch (dataSource.grade) {
|
||||
case 1:
|
||||
grades.x = 0;
|
||||
labTitle.x = 1;
|
||||
grade1.visible = true;
|
||||
grade2.visible = false;
|
||||
grade3.visible = false;
|
||||
break;
|
||||
case 2:
|
||||
grades.x = 0;
|
||||
labTitle.x = 1;
|
||||
grade1.visible = false;
|
||||
grade2.visible = true;
|
||||
grade3.visible = false;
|
||||
break;
|
||||
case 3:
|
||||
grades.x = 0;
|
||||
labTitle.x = 1;
|
||||
grade1.visible = false;
|
||||
grade2.visible = false;
|
||||
grade3.visible = true;
|
||||
break;
|
||||
default:
|
||||
grades.x = 1;
|
||||
labTitle.x = 0;
|
||||
grade1.visible = false;
|
||||
grade2.visible = false;
|
||||
grade3.visible = false;
|
||||
break;
|
||||
}
|
||||
labTitle.text = dataSource.name;
|
||||
labTitle.event(Laya.Event.RESIZE);
|
||||
labDescription.text = dataSource.description;
|
||||
unselected.visible = !( selected.visible = this.#selected.has(index) );
|
||||
box.offAll(Laya.Event.CLICK);
|
||||
box.on(Laya.Event.CLICK, this, () => {
|
||||
if(this.#selected.has(index)) {
|
||||
@@ -105,7 +55,8 @@ export default class Talent extends TalentUI {
|
||||
this.btnNext.label = this.#selected.size === core.talentSelectLimit
|
||||
? 'UI_Next'
|
||||
: 'UI_Talent_Select_Uncomplete';
|
||||
unselected.visible = !( selected.visible = this.#selected.has(index) );
|
||||
|
||||
$_.mapSet(box, this.#selected.has(index)? style.selected: style.normal);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -59,9 +59,9 @@ export default class Trajectory extends TrajectoryUI {
|
||||
return ['images/slider/vslider_1@3x$bar.png'];
|
||||
}
|
||||
|
||||
static #createComponent = plugin.extractComponents(CyberTrajectory.uiView, ['boxTrajectoryItem']);
|
||||
static #createComponent = plugin.extractComponents(Trajectory.uiView, ['boxTrajectoryItem']);
|
||||
#createTrajectoryItem() {
|
||||
const item = CyberTrajectory.#createComponent('boxTrajectoryItem');
|
||||
const item = Trajectory.#createComponent('boxTrajectoryItem');
|
||||
item.labContent = item.getChildByName('labContent');
|
||||
item.labAge = item.getChildByName('hboxAge').getChildByName('labAge');
|
||||
return item;
|
||||
|
||||
Reference in New Issue
Block a user