Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }