/// <summary> /// Focuses the specified control. /// </summary> /// <param name="control">The control to focus on.</param> protected void Focus(Control control) { if (focus == control) { } else { if (focus != null) { focus.SetFocus(false); } control.SetFocus(true); focus = control; } }
/// <summary> /// Initializes the scene. /// </summary> internal virtual void Initialize() { state = SceneState.Default; input = Manager.Input; var settings = Manager.Settings; Interface = new RootControl { Active = true, Position = Vector2.Zero, Size = new Vector2(settings.Resolution.BaseWidth, settings.Resolution.BaseHeight), Parent = null }; focus = Interface; OnInitialize(); }