public void Draw() { switch (State) { case ConsoleState.Closing: case ConsoleState.Opening: case ConsoleState.Open: SpriteBatch.Begin(); // Draw background. if (BgRenderer.Texture != null) { BgRenderer.Draw(); } else { SpriteBatch.Draw( WhiteTexture, WindowArea, new RectangleF( 0, 0, WindowArea.Width, WindowArea.Height), BackgroundColor); } // Draw bottom border if enabled (thickness larger than zero). if (BottomBorderThickness > 0) { SpriteBatch.Draw( WhiteTexture, new RectangleF(0, WindowArea.Bottom, WindowArea.Width, BottomBorderThickness), BottomBorderColor); } // Draw output and input strings. ConsoleOutput.Draw(); ConsoleInput.Draw(); SpriteBatch.End(); break; } }
public void LoadContent(ConsoleInput input) => _input = input;
public void LoadContent(ConsoleInput input) { _input = input; _input.InputChanged += (s, e) => CheckRepeatingProcess(); _input.Caret.Moved += (s, e) => CheckRepeatingProcess(); }