1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import ViewObject from "../../../main/ViewObject";
- const {ccclass, property} = cc._decorator;
- @ccclass
- export default class FFDialogBox extends ViewObject {
- @property(cc.Label)
- mTitle: cc.Label = null;
- @property(cc.Label)
- mContent: cc.Label = null;
- @property(cc.Label)
- mBtLabelOK: cc.Label = null;
- @property(cc.Label)
- mBtLabelCancel: cc.Label = null;
- public okCallback:()=>void;
- public cancelCallback:()=>void;
- public onclickOK(){
- if(this.okCallback){
- this.okCallback()
- }
- }
- public onclickCancel(){
- if(this.cancelCallback){
- this.cancelCallback()
- }
- }
- public setOKCallback(callback:()=>void){
- this.okCallback = callback
- }
- public setCancelCallback(callback:()=>void){
- this.cancelCallback = callback
- }
- }
|