/******************************************************************************* * * 消息框 * * * * 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() { // Rich宽度限制修正 let rich = nx.gui.getComponent( this.nodContent, "rich", cc.RichText ); if( rich ) { rich.maxWidth = this.nodContent.width; } }, // 设置 show: function( _text, _keys, _cb, _mgrcb ) { this.callback = _cb; this.mgrCB = _mgrcb; // 文本 if( this.nodContent ) { let txt = nx.text.getKey( _text ); let pos = Math.max( txt.search( "/>" ), txt.search( "