//**************************************************************************************************** // //**************************************************************************************************** private void OnDestroy() { if (m_instance == this) { m_instance = null; } }
//**************************************************************************************************** // //**************************************************************************************************** public void OnPopupPictureButon(POPUPPicture popup, POPUPPicture.ACTION action) { if (action == POPUPPicture.ACTION.SELECT) { if (string.IsNullOrEmpty(popup.picture) == false) { ReflectPicture(popup.picture); } } }
//**************************************************************************************************** // //**************************************************************************************************** public void Awake() { if (m_instance == null) { m_instance = this; } m_group = GetComponent <CanvasGroup>(); GameObject root = gameObject; GameObject buts = CORE.HIERARCHY.Find(root, "Buttons"); m_title = CORE.HIERARCHY.FindComp <UnityEngine.UI.Text>(root, "Title"); m_items = new UIItemList <UIPicListItem>(root, "Scroll View", "Viewport", "Content", "Scrollbar Vertical", "2D/UI/Picture", OnSelectListItem); for (int but = 0; but < ( int )BUTTON.NB_BUTTONS; ++but) { BUTTON button = ( BUTTON )but; m_buttons[( int )but] = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, string.Format("BT{0:D2}", but))); m_buttons[( int )but].SetListener(delegate { OnButton(button); }); } MapActionOnButton(BUTTON.BT00, ACTION.DELETE); MapActionOnButton(BUTTON.BT01, ACTION.UPLOAD); MapActionOnButton(BUTTON.BT02, ACTION.CANCEL); MapActionOnButton(BUTTON.BT03, ACTION.SELECT); httpReq = null; m_fade.Begin(FADE_TYPE.FADE_OUT, 0.0f); gameObject.SetActive(false); }