Esempio n. 1
0
 protected virtual void OnSelect(bool isSelected)
 {
     if (isSelected)
     {
         if (mOnGUI == null)
         {
             mOnGUI = base.gameObject.AddComponent <UIInputOnGUI>();
         }
         OnSelectEvent();
         return;
     }
     if (mOnGUI != null)
     {
         UnityEngine.Object.Destroy(mOnGUI);
         mOnGUI = null;
     }
     OnDeselectEvent();
 }
 protected virtual void OnSelect(bool isSelected)
 {
     if (isSelected)
     {
         if (this.mOnGUI == null)
         {
             this.mOnGUI = base.get_gameObject().AddComponent <UIInputOnGUI>();
         }
         this.OnSelectEvent();
     }
     else
     {
         if (this.mOnGUI != null)
         {
             Object.Destroy(this.mOnGUI);
             this.mOnGUI = null;
         }
         this.OnDeselectEvent();
     }
 }
Esempio n. 3
0
 protected virtual void OnSelect(bool isSelected)
 {
     if (isSelected)
     {
         if ((UnityEngine.Object) this.mOnGUI == (UnityEngine.Object)null)
         {
             this.mOnGUI = this.gameObject.AddComponent <UIInputOnGUI>();
         }
         this.OnSelectEvent();
     }
     else
     {
         if ((UnityEngine.Object) this.mOnGUI != (UnityEngine.Object)null)
         {
             UnityEngine.Object.Destroy((UnityEngine.Object) this.mOnGUI);
             this.mOnGUI = (UIInputOnGUI)null;
         }
         this.OnDeselectEvent();
     }
 }
Esempio n. 4
0
    /// <summary>
    /// Selection event, sent by the EventSystem.
    /// </summary>

    protected virtual void OnSelect(bool isSelected)
    {
        if (isSelected)
        {
#if !MOBILE
            if (mOnGUI == null)
            {
                mOnGUI = gameObject.AddComponent <UIInputOnGUI>();
            }
#endif
            OnSelectEvent();
        }
        else
        {
#if !MOBILE
            if (mOnGUI != null)
            {
                Destroy(mOnGUI);
                mOnGUI = null;
            }
#endif
            OnDeselectEvent();
        }
    }
Esempio n. 5
0
	/// <summary>
	/// Selection event, sent by the EventSystem.
	/// </summary>

	protected virtual void OnSelect (bool isSelected)
	{
		if (isSelected)
		{
			if (label != null) label.supportEncoding = false;

#if !MOBILE
			if (mOnGUI == null)
				mOnGUI = gameObject.AddComponent<UIInputOnGUI>();
#endif
			OnSelectEvent();
		}
		else
		{
#if !MOBILE
			if (mOnGUI != null)
			{
				Destroy(mOnGUI);
				mOnGUI = null;
			}
#endif
			OnDeselectEvent();
		}
	}
Esempio n. 6
0
	/// <summary>
	/// Selection event, sent by the EventSystem.
	/// </summary>

	protected virtual void OnSelect (bool isSelected)
	{
		if (isSelected)
		{
#if !MOBILE
			if (mOnGUI == null)
				mOnGUI = gameObject.AddComponent<UIInputOnGUI>();
#endif
			OnSelectEvent();
		}
		else
		{
#if !MOBILE
			if (mOnGUI != null)
			{
				Destroy(mOnGUI);
				mOnGUI = null;
			}
#endif
			OnDeselectEvent();
		}
	}
Esempio n. 7
0
 protected virtual void OnSelect(bool isSelected)
 {
     if (isSelected)
     {
         if (this.mOnGUI == null)
         {
             this.mOnGUI = base.gameObject.AddComponent<UIInputOnGUI>();
         }
         this.OnSelectEvent();
     }
     else
     {
         if (this.mOnGUI != null)
         {
             UnityEngine.Object.Destroy(this.mOnGUI);
             this.mOnGUI = null;
         }
         this.OnDeselectEvent();
     }
 }