const {ccclass, property} = cc._decorator;

@ccclass
export default class Content extends cc.Component {
    onLoad () {
        
        const platform = window['wx'] || window['qg']
        if (platform) {
            platform.setEnableDebug({
                enableDebug: true
            })
            platform.onShow(() => {
                console.log('onShow!')
                console.log('widget enabled: ', this.getComponent(cc.Widget).enabled)
            })
            platform.onHide(() => {
                console.log('onHide!')
                console.log('widget enabled: ', this.getComponent(cc.Widget).enabled)
            })
        }
        
    }
    
    start () {
        this.node.getComponent(cc.Widget).enabled = false
        this.node.x = 200
    }

    // update (dt) {}
}
