12345678910111213141516171819202122232425 |
- import { _decorator, Component, Node } from 'cc';
- import { tools } from '../../tools';
- const { ccclass, property } = _decorator;
- @ccclass('attributes_delete')
- export class attributes_delete extends Component {
- private call_back = null;
- @property(Node) btn_delete:Node = null;
- start() {
- this.btn_delete.on(Node.EventType.TOUCH_END,()=>{
- if(this.call_back!=null){
- tools.show_dialog("是否删除当前控件",()=>{
- this.call_back()
- })
- }
- })
- }
- public initView(call){
- this.call_back = call;
- }
- }
|