// private bool revertEnableCallback( Transform tr, object args ) // { // NvUIBase elem = tr.GetComponent<NvUIBase>(); // if ( elem != null ) // { // elem.revertEnable(); // return true; // } // // return false; // } // // public override void revertEnable() // { // base.revertEnable(); // enumWidgets( revertEnableCallback ); // } private bool setVisibleCallback(Transform tr, object args) { bool flag = (bool)args; NvUIBase elem = tr.GetComponent <NvUIBase>(); bool ret = false; if (elem != null) { elem.setVisible(flag); ret = true; } else { tr.gameObject.active = flag; } UIAnchor anchor = tr.GetComponent <UIAnchor>(); if (anchor != null) { anchor.enabled = flag; } Collider col = tr.GetComponent <Collider>(); if (col != null) { col.enabled = flag; } return(ret); }
private bool setVisibleCallback(Transform tr, object args) { bool flag = (bool)args; NvUIBase elem = tr.GetComponent <NvUIBase>(); if (elem != null) { elem.setVisible(flag); return(true); } else { tr.gameObject.active = flag; if (tr.collider != null) { tr.collider.enabled = flag; } } return(false); }
private bool setVisibleCallback(Transform tr, object args) { bool flag = (bool)args; NvUIBase elem = tr.GetComponent <NvUIBase>(); if (elem != null && !(elem is NvUIDialogBase)) { elem.setVisible(flag); return(true); } else if (!(elem is NvUIDialogBase)) { tr.gameObject.active = flag; } else { return(true); } return(false); }