System.Collections.Generic.List.IndexOf(UILabel)

Here are the examples of the csharp api System.Collections.Generic.List.IndexOf(UILabel) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

19 Source : UIPopupList.cs
with GNU General Public License v3.0
from aelariane

private void OnKey(KeyCode key)
    {
        if (base.enabled && NGUITools.GetActive(base.gameObject) && this.handleEvents)
        {
            int num = this.mLabelList.IndexOf(this.mHighlightedLabel);
            if (key == KeyCode.UpArrow)
            {
                if (num > 0)
                {
                    this.Select(this.mLabelList[num - 1], false);
                }
            }
            else if (key == KeyCode.DownArrow)
            {
                if (num + 1 < this.mLabelList.Count)
                {
                    this.Select(this.mLabelList[num + 1], false);
                }
            }
            else if (key == KeyCode.Escape)
            {
                this.OnSelect(false);
            }
        }
    }

19 Source : UIPopupList.cs
with MIT License
from huangx916

protected virtual void OnNavigate (KeyCode key)
	{
		if (enabled && current == this)
		{
			int index = mLabelList.IndexOf(mHighlightedLabel);
			if (index == -1) index = 0;

			if (key == KeyCode.UpArrow)
			{
				if (index > 0)
				{
					Select(mLabelList[--index], false);
				}
			}
			else if (key == KeyCode.DownArrow)
			{
				if (index + 1 < mLabelList.Count)
				{
					Select(mLabelList[++index], false);
				}
			}
		}
	}

19 Source : UIPopupList.cs
with MIT License
from mamoniem

void OnKey (KeyCode key)
	{
		if (enabled && NGUITools.GetActive(gameObject) && handleEvents)
		{
			int index = mLabelList.IndexOf(mHighlightedLabel);
			if (index == -1) index = 0;

			if (key == KeyCode.UpArrow)
			{
				if (index > 0)
				{
					Select(mLabelList[--index], false);
				}
			}
			else if (key == KeyCode.DownArrow)
			{
				if (index + 1 < mLabelList.Count)
				{
					Select(mLabelList[++index], false);
				}
			}
			else if (key == KeyCode.Escape)
			{
				OnSelect(false);
			}
		}
	}