UHSampleGame.MenuSystem.MenuEntry.Draw C# (CSharp) Method

Draw() public method

public Draw ( MenuScreen screen, Vector2 position, bool isSelected ) : void
screen MenuScreen
position Vector2
isSelected bool
return void
        public virtual void Draw(MenuScreen screen, Vector2 position, bool isSelected)
        {
            // Draw text, centered on the middle of each line.
            ScreenManager screenManager = screen.ScreenManager;
            SpriteBatch spriteBatch = ScreenManager.SpriteBatch;
            SpriteFont font = ScreenManager.Game.Content.Load<SpriteFont>("DummyText\\Font");
            if (!enabled)
            {
                spriteBatch.DrawString(font, text, position, disabledColor);
            }
            else
            {
                spriteBatch.DrawString(font, text, position, (isSelected ? selectedColor : color));
            }
        }