import { _decorator, Component, Label, Node } from 'cc';
import { config } from '../../config';
const { ccclass, property } = _decorator;

@ccclass('show_select_z_index_item')
export class show_select_z_index_item extends Component {
    @property(Node) lab_name:Node = null;
    protected m_call_back = null;
    private m_zIndex =0;
    public initView(zIndex:number,name:string,call){
        this.m_call_back = call;
        this.m_zIndex = zIndex;
        this.lab_name.getComponent(Label).string = name;
        this.node.on(Node.EventType.TOUCH_END,()=>{
            if(this.m_call_back!=null){
                this.m_call_back(this.m_zIndex)
            }
        })
    }
}


