Exemple #1
0
        protected override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            KeyboardUtils.Begin();

            if (KeyboardUtils.IsPressed(Keys.Space))
            {
                _drawBackground = !_drawBackground;
            }

            if (KeyboardUtils.IsPressed(Keys.Tab))
            {
                var i = 0;

                for (; i < _fontSystems.Length; ++i)
                {
                    if (_currentFontSystem == _fontSystems[i])
                    {
                        break;
                    }
                }

                ++i;
                if (i >= _fontSystems.Length)
                {
                    i = 0;
                }

                _currentFontSystem = _fontSystems[i];
            }

            if (KeyboardUtils.IsPressed(Keys.Enter))
            {
                _currentFontSystem.UseKernings = !_currentFontSystem.UseKernings;
            }

            if (KeyboardUtils.IsPressed(Keys.LeftShift))
            {
                _animatedScaling = !_animatedScaling;
            }

            KeyboardUtils.End();
        }
Exemple #2
0
        protected override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            KeyboardUtils.Begin();

            if (KeyboardUtils.IsPressed(Keys.Space))
            {
                _drawBackground = !_drawBackground;
            }

            if (KeyboardUtils.IsPressed(Keys.Enter))
            {
                _font.UseKernings = !_font.UseKernings;
            }

            if (KeyboardUtils.IsPressed(Keys.LeftShift))
            {
                _animatedScaling = !_animatedScaling;
            }

            KeyboardUtils.End();
        }