public void ChangeFocus(bool forward = true)
{
if (_children.Count > _focusID)
{
_children[_focusID].focus = false;
int current = _focusID;
for (int count = 0; count < _children.Count; ++count)
{
if (forward)
{
current += 1;
}
else
{
current -= 1;
}
if (current == _children.Count)
current = 0;
if (current < 0)
{
current = _children.Count - 1;
}
if (_children[current].canFocus)
{
_children[current].focus = true;
_focusID = current;
return;
}
}
}
}