Focus a control when it's added to a parent.

This commit is contained in:
Michael 2017-07-19 22:09:04 -04:00
parent 90f0e64d80
commit 5ab60d7706
2 changed files with 2 additions and 1 deletions

View file

@ -240,6 +240,7 @@ namespace ShiftOS.Frontend.GUI
ctrl._parent = this;
_children.Add(ctrl);
Invalidate();
UIManager.FocusedControl = ctrl;
}
}

View file

@ -135,7 +135,7 @@ namespace ShiftOS.Frontend.GraphicsSubsystem
{
if (!topLevels.Contains(ctrl))
topLevels.Add(ctrl);
FocusedControl = ctrl;
}
public static void InvalidateAll()