private static void MonoGameOnUpdate(Microsoft.Xna.Framework.Game sender, GameTime gameTime)
        {
            if (GameLoopThread.TryDequeue(out var job))
            {
                job.Start(false);
            }

            Pointing.Update();
            Input.Update(gameTime);
            Scene.Update(gameTime);
            Debug.Update(gameTime);
            Sound.Update(gameTime);

            if (Input.KeyTyped(Keys.F1))
            {
                Debug.HELP = !Debug.HELP;
            }

            if (Input.KeyTyped(Keys.F2))
            {
                Debug.GAME = !Debug.GAME;
            }

            if (Input.KeyTyped(Keys.F3))
            {
                Debug.GENERAL = !Debug.GENERAL;
            }

            if (Input.KeyTyped(Keys.F4))
            {
                Debug.UI = !Debug.UI;
            }

            if (Input.KeyTyped(Keys.F5))
            {
                Ui.Enabled = !Ui.Enabled;
            }

            if (Input.KeyTyped(Keys.F6))
            {
                Config.UIScaling -= 0.1f;
                Ui.RefreshLayout();
            }

            if (Input.KeyTyped(Keys.F7))
            {
                Config.UIScaling += 0.1f;
                Ui.RefreshLayout();
            }

            if (Input.KeyTyped(Keys.F8))
            {
                Config.UIScaling = 1f;
                Ui.RefreshLayout();
            }
        }
Exemple #2
0
        private static void MonoGameOnUpdate(Game sender, GameTime gameTime)
        {
            if (GameLoopThread.TryDequeue(out var job))
            {
                job.Start(false);
            }

            Pointing.Update();
            Input.Update(gameTime);
            Keyboard.Update();
            Scene.Update(gameTime);
            Debug.Update(gameTime);

            if (Input.KeyPress(Keys.F1))
            {
                DebugUi = !DebugUi;
            }

            if (Input.KeyPress(Keys.F2))
            {
                ShowDebug = !ShowDebug;
            }

            if (Input.KeyPress(Keys.F3))
            {
                Ui.ScaleFactor /= 2f;
                Scene.GetCurrentScene()?.RefreshLayout();
            }

            if (Input.KeyPress(Keys.F4))
            {
                Ui.ScaleFactor *= 2f;
                Scene.GetCurrentScene()?.RefreshLayout();
            }

            if (Input.KeyPress(Keys.F5))
            {
                ShowDebugOverlay = !ShowDebugOverlay;
            }

            if (Input.KeyPress(Keys.F6))
            {
                ShowGui = !ShowGui;
            }

            if (Input.KeyPress(Keys.F9))
            {
                Platform.Family = PlatformFamily.Mobile;
            }
        }