summaryrefslogtreecommitdiff
path: root/src/client/cl_keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/cl_keys.c')
-rw-r--r--src/client/cl_keys.c51
1 files changed, 25 insertions, 26 deletions
diff --git a/src/client/cl_keys.c b/src/client/cl_keys.c
index 1ce97418..e6e8261c 100644
--- a/src/client/cl_keys.c
+++ b/src/client/cl_keys.c
@@ -310,7 +310,8 @@ Handles horizontal scrolling and cursor blinking
x, y, and width are in pixels
===================
*/
-void Field_VariableSizeDraw( field_t *edit, int x, int y, int width, int size, qboolean showCursor ) {
+void Field_VariableSizeDraw( field_t *edit, int x, int y, int width, int size, qboolean showCursor,
+ qboolean noColorEscape ) {
int len;
int drawLen;
int prestep;
@@ -351,47 +352,45 @@ void Field_VariableSizeDraw( field_t *edit, int x, int y, int width, int size, q
float color[4];
color[0] = color[1] = color[2] = color[3] = 1.0;
- SCR_DrawSmallStringExt( x, y, str, color, qfalse );
+ SCR_DrawSmallStringExt( x, y, str, color, qfalse, noColorEscape );
} else {
// draw big string with drop shadow
- SCR_DrawBigString( x, y, str, 1.0 );
+ SCR_DrawBigString( x, y, str, 1.0, noColorEscape );
}
// draw the cursor
- if ( !showCursor ) {
- return;
- }
-
- if ( (int)( cls.realtime >> 8 ) & 1 ) {
- return; // off blink
- }
+ if ( showCursor ) {
+ if ( (int)( cls.realtime >> 8 ) & 1 ) {
+ return; // off blink
+ }
- if ( key_overstrikeMode ) {
- cursorChar = 11;
- } else {
- cursorChar = 10;
- }
+ if ( key_overstrikeMode ) {
+ cursorChar = 11;
+ } else {
+ cursorChar = 10;
+ }
- i = drawLen - Q_PrintStrlen( str );
+ i = drawLen - strlen( str );
- if ( size == SMALLCHAR_WIDTH ) {
- SCR_DrawSmallChar( x + ( edit->cursor - prestep - i ) * size, y, cursorChar );
- } else {
- str[0] = cursorChar;
- str[1] = 0;
- SCR_DrawBigString( x + ( edit->cursor - prestep - i ) * size, y, str, 1.0 );
+ if ( size == SMALLCHAR_WIDTH ) {
+ SCR_DrawSmallChar( x + ( edit->cursor - prestep - i ) * size, y, cursorChar );
+ } else {
+ str[0] = cursorChar;
+ str[1] = 0;
+ SCR_DrawBigString( x + ( edit->cursor - prestep - i ) * size, y, str, 1.0, qfalse );
+ }
}
}
-void Field_Draw( field_t *edit, int x, int y, int width, qboolean showCursor )
+void Field_Draw( field_t *edit, int x, int y, int width, qboolean showCursor, qboolean noColorEscape )
{
- Field_VariableSizeDraw( edit, x, y, width, SMALLCHAR_WIDTH, showCursor );
+ Field_VariableSizeDraw( edit, x, y, width, SMALLCHAR_WIDTH, showCursor, noColorEscape );
}
-void Field_BigDraw( field_t *edit, int x, int y, int width, qboolean showCursor )
+void Field_BigDraw( field_t *edit, int x, int y, int width, qboolean showCursor, qboolean noColorEscape )
{
- Field_VariableSizeDraw( edit, x, y, width, BIGCHAR_WIDTH, showCursor );
+ Field_VariableSizeDraw( edit, x, y, width, BIGCHAR_WIDTH, showCursor, noColorEscape );
}
/*