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(); } } }
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); }
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); } } }
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); } } }