A screen contains multiple controls and supports direct rendering to screen or to a texture for a latter usage such as using a 3D quad
Inheritance: IGuiElement, IUpdate
Ejemplo n.º 1
0
 /// <summary>
 /// Removes the provided Screen from the GuiManager
 /// </summary>
 /// <param name="screen"></param>
 public void RemoveScreen(Screen screen)
 {
     _screens.Remove(screen);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 
        /// </summary>
        public virtual void OnFocusAcquired()
        {
            HasFocus = true;
            _firstFocusedFrame = true;

            if (_focusedScreen != null && _focusedScreen != this)
                _focusedScreen.LoseFocus();

            _focusedScreen = this;

            // we specify to the selected menu item that he received focus so that it is displayed on screen
            if (_focusableControls.Count != 0)
                _focusableControls[_focusedControlIndex].SetFocus();

            if (FocusAcquired != null)
                FocusAcquired(this, EventArgs.Empty);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a new Screen instance, adds it to the Screens managed here and returns it
 /// </summary>
 public void AddScreen(Screen screen)
 {
     _screens.Add(screen);
 }