"use strict"; cc._RF.push(module, '00bba3SYuBNvoDIBLYznsEl', 'cmp.message.box'); // Scripts/nx/cmp/message/cmp.message.box.js "use strict"; /******************************************************************************* * * 消息框 * * * * 2021.12.10 ******************************************************************************/ cc.Class({ "extends": cc.Component, properties: { nodContent: { "default": null, type: cc.Node, displayName: "内容框" }, btnClose: { "default": null, type: cc.Node, displayName: "关闭按钮" }, nodChoices: { "default": null, type: cc.Node, displayName: "选择面板" }, btnChoices: { "default": [], type: cc.Node, displayName: "选项数组" } }, // 载入 onLoad: function onLoad() { // Rich宽度限制修正 var rich = nx.gui.getComponent(this.nodContent, "rich", cc.RichText); if (rich) { rich.maxWidth = this.nodContent.width; } }, // 设置 show: function show(_text, _keys, _cb, _mgrcb) { this.callback = _cb; this.mgrCB = _mgrcb; // 文本 if (this.nodContent) { var txt = nx.text.getKey(_text); var pos = Math.max(txt.search("/>"), txt.search("