DebugViewImpl.ts
1.61 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { DymmyEditBox, DummyRichText } from "../../../../common/CCDummyObjects";
import { CCPureView } from "../../../../common/classbase/CCViewBase";
import { RegView } from "../../PresenterCCViewFactory";
import { DebugView, DebugViewProps, DebugViewType } from "../type/DebugView";
const { ccclass, property } = cc._decorator;
@ccclass
@RegView(DebugViewType, "prefab/ui/DebugView")
export class DebugViewImpl extends CCPureView<DebugViewProps> implements DebugView {
@property(cc.RichText)
playerIdlabel: cc.RichText = DummyRichText;
@property(cc.EditBox)
catFoodNumber: cc.EditBox = DymmyEditBox;
@property(cc.EditBox)
cannedNumber: cc.EditBox = DymmyEditBox;
onLoad() {
this.bindProp("playerID", this.playerIdlabel, "string");
}
onCopyIdBtnClick() {
this._props.onCopyIdBtnClickCallback();
}
onClearRecordBtnClick() {
this._props.onClearRecordBtnClickCallback();
}
onCopyRecordBtnClick() {
this._props.onCopyRecordBtnClickCallback();
}
onYouHuaBtnClick() {
this._props.onYouHuaBtnClickCallback();
}
onShouBiaoBtnClick() {
this._props.onShouBiaoBtnClickCallback();
}
onCatFoodBtnClick() {
this._props.onCatFoodBtnClickCallback(Number(this.catFoodNumber.string));
}
onCannedBtnClick() {
this._props.onCannedBtnClickCallback(Number(this.cannedNumber.string));
}
onClearSuitShareRecordBtnClick() {
this._props.onClearSuitShareRecordBtnClickCallback();
}
onCloseBtnClick() {
this.close();
}
}