Commits

wifiman committed 436827f

Fixed the console clock to not obscure the input line.

Comments (0)

Files changed (1)

 
 	len = (int)strlen(key_lines[edit_line]);
 
-	if (len >= (viddef.width * 0.125f) - (i+2))
-		offset = 20;
-	else
-		offset = 0;
-
 	for (x=sizeof(versionString)-2; x>=0 ; x--)
-		re.DrawChar (viddef.width-2-((sizeof(versionString) - 1)*8)+x*8, lines-12-offset, 128 + versionString[x] );
+		re.DrawChar (viddef.width-2-((sizeof(versionString) - 1)*8)+x*8, lines-12, 128 + versionString[x] );
 
 	t = time (NULL);
 	today = localtime(&t);
 
 	i = (int)strftime (timeBuffer, sizeof(timeBuffer), "%H:%M:%S", today);
+
+	// keep the clock from obscuring the input line
+	if (len >= (viddef.width * 0.125f) - (i+2))
+		offset = 10;
+	else
+		offset = 0;
+
 	for (x=0 ; x<i ; x++)
-		re.DrawChar (viddef.width-66+x*8, lines-22-offset, 128 + timeBuffer[x] );
+		re.DrawChar (viddef.width-(i*8+2)+x*8, lines-22-offset, 128 + timeBuffer[x] );
 
 // draw the text
 	con.vislines = lines;