Exemplo n.º 1
0
 /// <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;
     }
 }
Exemplo n.º 2
0
        /// <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();
        }