Show() public method

public Show ( bool modal ) : void
modal bool
return void
示例#1
0
 private static void Update(GameTime time)
 {
     // Called each logic update.
     if (!_characterWindow.IsVisible)
     {
         // This block of code cycles through the consoles in the SadConsole.Engine.ConsoleRenderStack, showing only a single console
         // at a time. This code is provided to support the custom consoles demo. If you want to enable the demo, uncomment one of the lines
         // in the Initialize method above.
         if (SadConsole.Global.KeyboardState.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F1))
         {
             MainConsole.MoveNextConsole();
         }
         else if (SadConsole.Global.KeyboardState.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F2))
         {
             _characterWindow.Show(true);
         }
         else if (SadConsole.Global.KeyboardState.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F3))
         {
         }
         else if (SadConsole.Global.KeyboardState.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F5))
         {
             SadConsole.Settings.ToggleFullScreen();
         }
     }
 }
示例#2
0
        protected override void Update(GameTime gameTime)
        {
            // Update the SadConsole engine, handles the mouse, keyboard, and any special effects. You must call this.
            SadConsole.Engine.Update(gameTime, this.IsActive);

            if (!_characterWindow.IsVisible)
            {
                // This block of code cycles through the consoles in the SadConsole.Engine.ConsoleRenderStack, showing only a single console
                // at a time. This code is provided to support the custom consoles demo. If you want to enable the demo, uncomment one of the lines
                // in the Initialize method above.
                if (SadConsole.Engine.Keyboard.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F1))
                {
                    currentConsoleIndex++;

                    if (currentConsoleIndex >= SadConsole.Engine.ConsoleRenderStack.Count)
                    {
                        currentConsoleIndex = 0;
                    }

                    for (int i = 0; i < SadConsole.Engine.ConsoleRenderStack.Count; i++)
                    {
                        SadConsole.Engine.ConsoleRenderStack[i].IsVisible = currentConsoleIndex == i;
                    }

                    Engine.ActiveConsole = SadConsole.Engine.ConsoleRenderStack[currentConsoleIndex];
                }
                else if (SadConsole.Engine.Keyboard.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F2))
                {
                    _characterWindow.Show(true);
                }
            }

            base.Update(gameTime);
        }
示例#3
0
 private static void Engine_EngineUpdated(object sender, EventArgs e)
 {
     if (!_characterWindow.IsVisible)
     {
         // This block of code cycles through the consoles in the SadConsole.Engine.ConsoleRenderStack, showing only a single console
         // at a time. This code is provided to support the custom consoles demo. If you want to enable the demo, uncomment one of the lines
         // in the Initialize method above.
         if (SadConsole.Engine.Keyboard.IsKeyReleased(SFML.Window.Keyboard.Key.F1))
         {
             MoveNextConsole();
         }
         else if (SadConsole.Engine.Keyboard.IsKeyReleased(SFML.Window.Keyboard.Key.F2))
         {
             _characterWindow.Show(true);
         }
         else if (SadConsole.Engine.Keyboard.IsKeyReleased(SFML.Window.Keyboard.Key.F3))
         {
             _characterWindow.Show(true);
             Engine.DefaultFont.ResizeGraphicsDeviceManager(Engine.Device, 120, 60, 0, 0);
         }
     }
 }
示例#4
0
 private static void Engine_EngineUpdated(object sender, EventArgs e)
 {
     if (!_characterWindow.IsVisible)
     {
         // This block of code cycles through the consoles in the SadConsole.Engine.ConsoleRenderStack, showing only a single console
         // at a time. This code is provided to support the custom consoles demo. If you want to enable the demo, uncomment one of the lines
         // in the Initialize method above.
         if (SadConsole.Engine.Keyboard.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F1))
         {
             MoveNextConsole();
         }
         else if (SadConsole.Engine.Keyboard.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.F2))
         {
             _characterWindow.Show(true);
         }
     }
 }