UICamera.IsHighlighted C# (CSharp) Method

IsHighlighted() static public method

Returns whether the widget should be currently highlighted as far as the UICamera knows.
static public IsHighlighted ( GameObject go ) : bool
go GameObject
return bool
	static public bool IsHighlighted (GameObject go)
	{
		for (int i = mHighlighted.Count; i > 0; )
		{
			Highlighted hl = mHighlighted[--i];
			if (hl.go == go) return true;
		}
		return false;
	}

Usage Example

コード例 #1
0
    private void OnEnable()
    {
        //IL_000d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0012: Expected O, but got Unknown
        //IL_004a: Unknown result type (might be due to invalid IL or missing references)
        //IL_007d: Unknown result type (might be due to invalid IL or missing references)
        if (mStarted)
        {
            OnHover(UICamera.IsHighlighted(this.get_gameObject()));
        }
        if (UICamera.currentTouch != null)
        {
            if (trigger == Trigger.OnPress || trigger == Trigger.OnPressTrue)
            {
                mActivated = (UICamera.currentTouch.pressed == this.get_gameObject());
            }
            if (trigger == Trigger.OnHover || trigger == Trigger.OnHoverTrue)
            {
                mActivated = (UICamera.currentTouch.current == this.get_gameObject());
            }
        }
        UIToggle component = this.GetComponent <UIToggle>();

        if (component != null)
        {
            EventDelegate.Add(component.onChange, OnToggle);
        }
    }
All Usage Examples Of UICamera::IsHighlighted