public override void OnKeyPress(Game game_, KeyPressEventArgs e) { if (!visible) { return; } if (e.GetKeyChar() == 8) // backspace { return; } for (int i = maxColumns - 1; i > cursorColumn; i--) { buffer[cursorLine][i] = buffer[cursorLine][i - 1]; } buffer[cursorLine][cursorColumn] = e.GetKeyChar(); cursorColumn++; e.SetHandled(true); }
public override void OnKeyPress(Game game_, KeyPressEventArgs e) { if (!visible) { return; } if (e.GetKeyChar() == 8) // backspace { return; } for (int i = maxColumns - 1; i > cursorColumn; i--) { buffer[cursorLine][i] = buffer[cursorLine][i - 1]; } buffer[cursorLine][cursorColumn] = e.GetKeyChar(); cursorColumn++; e.SetHandled(true); }