]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Tomaz enabled some numpad keys in the console and the insert key, and also fixed...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 15 May 2004 21:49:10 +0000 (21:49 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 15 May 2004 21:49:10 +0000 (21:49 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4172 d7cf8633-e32d-0410-b094-e92efae38249

console.c
keys.c

index 86301d24c6bf8aa932601d8dbf16babf53aac9c1..4cce82f93ff37ca399f66f85c227a0048e03419e 100644 (file)
--- a/console.c
+++ b/console.c
@@ -679,6 +679,8 @@ Modified by EvilTypeGuy eviltypeguy@qeradiant.com
 */
 void Con_DrawInput (void)
 {
+       int             y;
+       int             i;
        char editlinecopy[257], *text;
 
        if (!key_consoleactive)
@@ -691,11 +693,17 @@ void Con_DrawInput (void)
        // use strlen of edit_line instead of key_linepos to allow editing
        // of early characters w/o erasing
 
+       y = strlen(text);
+
+// fill out remainder with spaces
+       for (i = y; i < 256; i++)
+               text[i] = ' ';
+
        // add the cursor frame
        if ((int)(realtime*con_cursorspeed) & 1)                // cursor is visible
                text[key_linepos] = 11 + 130 * key_insert;      // either solid or triangle facing right
 
-       text[key_linepos + 1] = 0;
+//     text[key_linepos + 1] = 0;
 
        // prestep if horizontally scrolling
        if (key_linepos >= con_linewidth)
@@ -705,7 +713,7 @@ void Con_DrawInput (void)
        DrawQ_String(0, con_vislines - 16, text, con_linewidth, 8, 8, 1, 1, 1, 1, 0);
 
        // remove cursor
-       key_lines[edit_line][key_linepos] = 0;
+//     key_lines[edit_line][key_linepos] = 0;
 }
 
 
diff --git a/keys.c b/keys.c
index 922ef11ea7245246ca20d7573646fcca51cfd67d..e3048b7626a363cc6fd56a8b168aa178d9990692 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -822,6 +822,7 @@ Key_Init (void)
        consolekeys[K_DOWNARROW] = true; consolekeys[K_KP_DOWNARROW] = true;
        consolekeys[K_BACKSPACE] = true;
        consolekeys[K_DEL] = true; consolekeys[K_KP_DEL] = true;
+       consolekeys[K_INS] = true; consolekeys[K_KP_INS] = true;
        consolekeys[K_HOME] = true; consolekeys[K_KP_HOME] = true;
        consolekeys[K_END] = true; consolekeys[K_KP_END] = true;
        consolekeys[K_PGUP] = true; consolekeys[K_KP_PGUP] = true;
@@ -829,6 +830,10 @@ Key_Init (void)
        consolekeys[K_SHIFT] = true;
        consolekeys[K_MWHEELUP] = true;
        consolekeys[K_MWHEELDOWN] = true;
+       consolekeys[K_KP_PLUS] = true;
+       consolekeys[K_KP_MINUS] = true;
+       consolekeys[K_KP_DIVIDE] = true;
+       consolekeys[K_KP_MULTIPLY] = true;
        consolekeys['`'] = false;
        consolekeys['~'] = false;