| 373 | * ================ |
| 374 | */ |
| 375 | private static void DrawInput() { |
| 376 | int i; |
| 377 | byte[] text; |
| 378 | int start = 0; |
| 379 | |
| 380 | if (ClientGlobals.cls.key_dest == key_menu) |
| 381 | return; |
| 382 | |
| 383 | if (ClientGlobals.cls.key_dest != key_console && ClientGlobals.cls.state == ca_active) |
| 384 | return; // don't draw anything (always draw if not active) |
| 385 | |
| 386 | text = ClientGlobals.key_lines[ClientGlobals.edit_line]; |
| 387 | |
| 388 | // add the cursor frame |
| 389 | //text[key_linepos] = (byte) (10 + ((int) (cls.realtime >> 8) & 1)); //sfranzyshen |
| 390 | |
| 391 | // fill out remainder with spaces |
| 392 | for (i = ClientGlobals.key_linepos ; i < ClientGlobals.con.linewidth; i++) // sfranzyshen |
| 393 | text[i] = ' '; |
| 394 | |
| 395 | // prestep if horizontally scrolling |
| 396 | if (ClientGlobals.key_linepos >= ClientGlobals.con.linewidth) |
| 397 | start += 1 + ClientGlobals.key_linepos - ClientGlobals.con.linewidth; |
| 398 | |
| 399 | // draw it |
| 400 | // y = con.vislines-16; |
| 401 | |
| 402 | // sfranzyshen --start |
| 403 | for (i = 0; i < ClientGlobals.con.linewidth; i++) { |
| 404 | //old:re.DrawChar((i + 1) << 3, con.vislines - 22, text[i]); |
| 405 | if (ClientGlobals.con.backedit == ClientGlobals.key_linepos-i && (((int)(ClientGlobals.cls.realtime >> 8)&1) !=0)) |
| 406 | ClientGlobals.re.DrawChar ((i + 1) << 3, ClientGlobals.con.vislines - 22, (char)11); |
| 407 | else |
| 408 | ClientGlobals.re.DrawChar ((i + 1) << 3, ClientGlobals.con.vislines - 22, text[i]); |
| 409 | } |
| 410 | // sfranzyshen - stop |
| 411 | |
| 412 | |
| 413 | // remove cursor |
| 414 | ClientGlobals.key_lines[ClientGlobals.edit_line][ClientGlobals.key_linepos] = 0; |
| 415 | } |
| 416 | |
| 417 | /* |
| 418 | * ================ Con_DrawNotify |