继续整理UI
This commit is contained in:
@@ -6610,11 +6610,11 @@
|
|||||||
"_$type": "VBox",
|
"_$type": "VBox",
|
||||||
"name": "labels",
|
"name": "labels",
|
||||||
"x": 40,
|
"x": 40,
|
||||||
"y": 96,
|
"y": 98,
|
||||||
"width": 1120,
|
"width": 1120,
|
||||||
"height": 504,
|
"height": 504,
|
||||||
"mouseThrough": true,
|
"mouseThrough": true,
|
||||||
"top": 96,
|
"top": 98,
|
||||||
"centerX": 0,
|
"centerX": 0,
|
||||||
"space": 0,
|
"space": 0,
|
||||||
"align": "center",
|
"align": "center",
|
||||||
|
|||||||
@@ -10,6 +10,5 @@
|
|||||||
},
|
},
|
||||||
"splash": {
|
"splash": {
|
||||||
"fit": "center"
|
"fit": "center"
|
||||||
},
|
}
|
||||||
"stat": true
|
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
export const EVENT_TYPES = {
|
export const EVENT_TYPES = {
|
||||||
NOT_UPDATE_MISTAKE: "NOT_UPDATE_MISTAKE",//更新分数
|
NOT_UPDATE_MISTAKE: "NOT_UPDATE_MISTAKE",//更新分数
|
||||||
NOT_UPDATE_PAUSE: "NOT_UPDATE_PAUSE",//更新暂停状态
|
NOT_UPDATE_PAUSE: "NOT_UPDATE_PAUSE",//更新暂停状态
|
||||||
|
|
||||||
|
NOT_SET_TROPHY_BUTTON: "NOT_SET_TROPHY_BUTTON",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export class TopBar extends Laya.Script {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClickTab(isClassic: boolean): void {
|
onClickTab(isClassic: boolean): void {
|
||||||
this.isClassic = true
|
this.isClassic = isClassic
|
||||||
if (isClassic) {
|
if (isClassic) {
|
||||||
UIManager.getInstance().closeTrophyUI()
|
UIManager.getInstance().closeTrophyUI()
|
||||||
UIManager.getInstance().closeDCUI()
|
UIManager.getInstance().closeDCUI()
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { CalendarUnit } from "./CalendarUnit";
|
|||||||
import { UIManager } from "../../models/UIManager";
|
import { UIManager } from "../../models/UIManager";
|
||||||
import { respath } from "../../constants/respath";
|
import { respath } from "../../constants/respath";
|
||||||
import { MONTH_LIST } from "../../models/DCManager";
|
import { MONTH_LIST } from "../../models/DCManager";
|
||||||
|
import { EVENT_TYPES, EventManager } from "../../models/EventManager";
|
||||||
|
|
||||||
|
|
||||||
const { regClass, property } = Laya;
|
const { regClass, property } = Laya;
|
||||||
@@ -59,7 +60,10 @@ export class DailyChallenge extends Laya.Script {
|
|||||||
private currentIndex: number
|
private currentIndex: number
|
||||||
private indexMax: number
|
private indexMax: number
|
||||||
|
|
||||||
|
private static _instance: DailyChallenge
|
||||||
onAwake(): void {
|
onAwake(): void {
|
||||||
|
DailyChallenge._instance = this
|
||||||
|
|
||||||
if (this.btn_back) {
|
if (this.btn_back) {
|
||||||
this.btn_back.on(Laya.Event.CLICK, this, ()=>{
|
this.btn_back.on(Laya.Event.CLICK, this, ()=>{
|
||||||
UIManager.getInstance().loadHomeUI()
|
UIManager.getInstance().loadHomeUI()
|
||||||
@@ -126,6 +130,18 @@ export class DailyChallenge extends Laya.Script {
|
|||||||
this.loadWithIndex(this.currentIndex)
|
this.loadWithIndex(this.currentIndex)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
EventManager.getInstance().RegisterEvent(EVENT_TYPES.NOT_SET_TROPHY_BUTTON, DailyChallenge.EventUpdateTrophyButton)
|
||||||
|
}
|
||||||
|
|
||||||
|
onDestroy(): void {
|
||||||
|
EventManager.getInstance().UnregisterEvent(EVENT_TYPES.NOT_SET_TROPHY_BUTTON, DailyChallenge.EventUpdateTrophyButton)
|
||||||
|
}
|
||||||
|
|
||||||
|
public static EventUpdateTrophyButton(arg: any): void {
|
||||||
|
if (DailyChallenge._instance) {
|
||||||
|
DailyChallenge._instance.btn_trophy.visible = arg
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loadWithMonth(): void {
|
loadWithMonth(): void {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { config } from "../../constants/config";
|
import { config } from "../../constants/config";
|
||||||
import { respath } from "../../constants/respath";
|
import { respath } from "../../constants/respath";
|
||||||
import { MONTH_LIST } from "../../models/DCManager";
|
import { MONTH_LIST } from "../../models/DCManager";
|
||||||
|
import { EVENT_TYPES, EventManager } from "../../models/EventManager";
|
||||||
import { UIManager } from "../../models/UIManager";
|
import { UIManager } from "../../models/UIManager";
|
||||||
import { TrophyUnit } from "./TrophyUnit";
|
import { TrophyUnit } from "./TrophyUnit";
|
||||||
|
|
||||||
@@ -105,6 +106,11 @@ export class TrophyRoom extends Laya.Script {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
EventManager.getInstance().DispatchEvent(EVENT_TYPES.NOT_SET_TROPHY_BUTTON, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onDestroy(): void {
|
||||||
|
EventManager.getInstance().DispatchEvent(EVENT_TYPES.NOT_SET_TROPHY_BUTTON, true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user