add: channel switch

This commit is contained in:
Vick Scarlet
2026-08-16 20:06:16 +08:00
committed by 神戸小鳥
parent ce74c5221f
commit 4307904239
16 changed files with 484 additions and 524 deletions
+23 -19
View File
@@ -1,28 +1,32 @@
export default class Main extends ui.view.DefaultTheme.MainUI {
constructor() {
super();
this.btnRemake.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.MODE));
this.btnAchievement.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.ACHIEVEMENT));
this.btnThanks.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.THANKS));
this.btnGithub.on(Laya.Event.CLICK, this, goto, ['github']);
this.btnDiscord.on(Laya.Event.CLICK, this, goto, ['discord']);
this.btnThemes.on(Laya.Event.CLICK, this, ()=>$ui.showDialog(UI.pages.THEMES));
this.btnSaveLoad.on(Laya.Event.CLICK, this, ()=>$ui.showDialog(UI.pages.SAVELOAD));
super()
this.btnRemake.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.MODE))
this.btnAchievement.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.ACHIEVEMENT))
this.btnThanks.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.THANKS))
this.btnGithub.on(Laya.Event.CLICK, this, goto, ['github'])
this.btnDiscord.on(Laya.Event.CLICK, this, goto, ['discord'])
this.btnThemes.on(Laya.Event.CLICK, this, () => $ui.showDialog(UI.pages.THEMES))
this.btnSaveLoad.on(Laya.Event.CLICK, this, () => $ui.showDialog(UI.pages.SAVELOAD))
}
static load() {
return [
"images/atlas/images/icons.atlas",
]
return ['images/atlas/images/icons.atlas']
}
init() {
this.banner.visible =
this.btnDiscord.visible =
this.btnAchievement.visible =
this.btnThanks.visible = !!core.times;
const text = this.labSubTitle.text;
this.labSubTitle.text = ' ';
this.labSubTitle.text = text;
const text = this.labSubTitle.text
this.labSubTitle.text = ' '
this.labSubTitle.text = text
const leastOnce = !!core.times
this.banner.visible = leastOnce
this.btnAchievement.visible = leastOnce
this.btnThanks.visible = leastOnce
const disabled = globalThis.$channel?.disabled || {}
this.btnDiscord.visible = leastOnce && !disabled.discord
this.btnGithub.visible = !disabled.github
this.btnSaveLoad.visible = !disabled.saveload
}
}
}