Oscetch.MonoGame.GuiComponent/GuiControl.cs
/// <summary>
/// Searches for the child by the control id and returns the index. If no match is found it returns -1
/// </summary>
/// <param name="child"></param>
/// <returns></returns>
Searches for the child by the control id and returns the index. If no match is found it returns -1
Searches for the child by the control id and returns the index . If no match is found it returns - 1
public int IndexOf(GuiControl<T> child)
        {
            for (var i = 0; i < _children.Count; i++)
            {
                if (_children[i].Id == child.Id)
                {
                    return i;
                }
            }
            return -1;
        }
public int IndexOf ( GuiControl < T > child ) { for ( var i = 0 ; i < _children . Count ; i ++ ) { if ( _children [ i ] . Id == child . Id ) { return i ; } } return - 1 ; }
Searches for the child by the control id and returns the index.
Searches for the child by the control id and returns the index .
None
child
GuiControl<T>
None