1234567891011121314151617181920212223242526272829303132333435363738 |
- /** @format */
- import {node, observer} from '../../mobx/observer'
- import {BaseUI} from '../BaseUI'
- import {ccUtils} from '../../utils/ccUtils'
- import {IMessage} from '../../interface/UIInterface'
- import {LANGUAGE_TYPE} from '../../enums/Enum'
- const {ccclass, property} = cc._decorator
- @ccclass
- @observer
- export class MessageUI extends BaseUI {
- sureFunc: Function = null
- @node('layout/button_cancel')
- btnCancel: cc.Node = null
- onShow(args: IMessage, fromUI: number) {
- this.sureFunc = args.sureFuc
- this.btnCancel.active = !args.isHideCancel
- ccUtils.setLabel(args.tip, this.node, 'lb')
- ccUtils.setLabel(args.sureLb ? args.sureLb : LANGUAGE_TYPE.confirm, this.node, 'layout/btn_sure/lb')
- }
- onHide(): any {}
- //网络事件=======================================
- //触发事件=======================================
- // @render
- // showRender() {}
- // 点击事件=======================================
- onSureClick() {
- this.hide()
- this.sureFunc && this.sureFunc()
- }
- }
|