0e01b7de-7dae-440c-a2f0-d4eb0fcc111c.js
2.95 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
60
61
62
63
64
65
66
67
"use strict";
cc._RF.push(module, '0e01bfefa5EDKLw1OsPzBEc', 'MessageViewImpl');
// script/game/ui/view/impl/MessageViewImpl.ts
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MessageViewImpl = void 0;
const MessageView_1 = require("../type/MessageView");
const simba_cc_resutils_1 = require("simba-cc-resutils");
const MessageEntryItem_1 = require("./MessageEntryItem");
const ListViewImpl_1 = require("../../baseview/impl/ListViewImpl");
const PresenterCCViewFactory_1 = require("../../PresenterCCViewFactory");
const GameModelManager_1 = require("../../../model/GameModelManager");
const CCDummyObjects_1 = require("../../../../common/CCDummyObjects");
const { ccclass, property } = cc._decorator;
let MessageViewImpl = /** @class */ (() => {
let MessageViewImpl = class MessageViewImpl extends ListViewImpl_1.ListViewImpl {
constructor() {
super(...arguments);
this.plotStopTipBtnNode = CCDummyObjects_1.DummyNode;
this.getItemNode = (k) => {
let ret = undefined;
let v = this._itemViews[k];
if (v) {
ret = v.node;
ret.getComponent(cc.Widget).updateAlignment();
}
return ret;
};
}
async createListItemView() {
let node = await simba_cc_resutils_1.ResUtils.createWithPrefab("prefab/ui/message/MessageEntryItem");
return node.getComponent(MessageEntryItem_1.MessageEntryItemImpl);
}
onLoad() {
super.onLoad();
this.bindProp("isShowPlotStopTipBtn", (value) => {
this.plotStopTipBtnNode.active = value;
});
}
onRefreshListEnd() {
this.scrollView.node.getComponent(cc.Widget).updateAlignment();
this.contentLayout.updateLayout();
GameModelManager_1.GameModelManager.CheckMsgGuide.emit();
}
onPlotStopTipBtnCallback() {
this._props.PlotStopTipBtnCallback();
}
};
__decorate([
property(cc.Node)
], MessageViewImpl.prototype, "plotStopTipBtnNode", void 0);
MessageViewImpl = __decorate([
ccclass,
PresenterCCViewFactory_1.RegView(MessageView_1.MessageViewType, "prefab/ui/MessageView")
], MessageViewImpl);
return MessageViewImpl;
})();
exports.MessageViewImpl = MessageViewImpl;
cc._RF.pop();