Пример #1
0
 private void DrawMouse(SpriteBatch spriteBatch, GameTime gameTime)
 {
     if (MouseTexture != null && _mouseVisible)
     {
         spriteBatch.Draw(MouseTexture, InputMap.GetMousePosition(), Color.White);
     }
 }
Пример #2
0
        protected override void UpdateScreen(GameTime gameTime)
        {
            if (MenuState == MenuState.Normal)
            {
                if (_menuEntries.Count == 0)
                {
                    return;
                }

                if (_menuEntries[_selectedEntry].State != MenuEntry.EntryState.Highlight)
                {
                    _menuEntries[_selectedEntry].Highlight();
                }

                for (int i = 0; i < _menuEntries.Count; i++)
                {
                    _menuEntries[i].UpdateEntry(gameTime);
                    _menuEntries[_selectedEntry].AnimateHighlighted(gameTime);
                }

                if (MouseTexture != null)
                {
                    Vector2 mousePos = InputMap.GetMousePosition();
                    MouseBounds = new Rectangle((int)mousePos.X, (int)mousePos.Y, MouseTexture.Width, MouseTexture.Height);
                }
            }
            else if (MenuState == MenuState.ActivatingSubmenu)
            {
                ActivateSubmenu();
            }
            else
            {
                Restore();
            }
        }