diff --git a/Quake/cmd.c b/Quake/cmd.c index 585c9808..625a8efe 100644 --- a/Quake/cmd.c +++ b/Quake/cmd.c @@ -1510,7 +1510,7 @@ qboolean Cmd_ExecuteString (const char *text, cmd_source_t src) if (Cmd_IsQuitMistype(Cmd_Argv(0))) // // woods -- #smartquit -- check for mistyped "quit" command { - if (SCR_ModalMessage(va("you typed: %s\n\n do you want to quit? (y/n)\n", Cmd_Argv(0)), 0.0f)) + if (SCR_ModalMessage(va("you typed: ^m%s^m\n\n do you want to quit? (^my^m/^mn^m)\n", Cmd_Argv(0)), 0.0f)) Host_Quit_f(); return true; } diff --git a/Quake/gl_screen.c b/Quake/gl_screen.c index 1371338f..5711effb 100644 --- a/Quake/gl_screen.c +++ b/Quake/gl_screen.c @@ -3495,12 +3495,13 @@ void SCR_EndLoadingPlaque (void) const char *scr_notifystring; qboolean scr_drawdialog; -void SCR_DrawNotifyString (void) +void SCR_DrawNotifyString (void) // woods add ^m support { const char *start; int l; - int j; int x, y; + int mask = 0; // Masking state + int last_char = 0; // Previous character GL_SetCanvas (CANVAS_MENU); //johnfitz @@ -3508,25 +3509,92 @@ void SCR_DrawNotifyString (void) y = 200 * 0.35; //johnfitz -- stretched overlays - do + while (*start) { - // scan the width of the line - for (l=0 ; l<40 ; l++) + // First pass: calculate visible length (excluding control sequences) + int visible_length = 0; + for (l = 0; l < 40; l++) + { if (start[l] == '\n' || !start[l]) break; - x = (320 - l*8)/2; //johnfitz -- stretched overlays - for (j=0 ; j