ExtraPlotViewImpl.ts
1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { DummyNode } from "../../../../common/CCDummyObjects";
import { CCPureView } from "../../../../common/classbase/CCViewBase";
import { RegView } from "../../PresenterCCViewFactory";
import { ExtraPlotView, ExtraPlotViewProps, ExtraPlotViewType } from "../type/ExtraPlotView";
const { ccclass, property } = cc._decorator;
@ccclass
@RegView(ExtraPlotViewType, "prefab/ui/ExtraPlotView")
export class ExtraPlotViewImpl extends CCPureView<ExtraPlotViewProps> implements ExtraPlotView {
@property({ type: [cc.Node], displayName: "Countdown node" })
markButtonNodes: cc.Node[] = [];
@property({ type: cc.Node, displayName: "Mask node" })
maskNode: cc.Node = DummyNode;
@property({ type: cc.Node, displayName: "Buttons node" })
buttonsNode: cc.Node = DummyNode;
getMarkButtonNodes(): cc.Node[] {
return this.markButtonNodes;
}
getMaskNode(): cc.Node {
return this.maskNode;
}
getButtonsNode(): cc.Node {
return this.buttonsNode;
}
onMarkButtonClick(event, customEventData) {
let tabbarId = Number(customEventData);
this._props.onMarkButtonClickCallback(tabbarId);
}
onGotoShopButtonClick() {
this._props.onGotoShopButtonClickCallback();
}
onCloseButtonClick() {
this._props.onCloseButtonClickCallback();
}
}