fixed the position and size of the highlight rectangle of com_completionStyle 1

This commit is contained in:
myT 2017-07-30 03:27:54 +02:00
parent dff8216de7
commit ac9d10cc97

View file

@ -412,10 +412,11 @@ static void Con_DrawInput()
if ( g_consoleField.acOffset > 0 ) {
const int length = g_consoleField.acLength;
if ( length > 0 ) {
// note that Field_Draw takes integers as arguments so we need to truncate our coordinates and font sizes to match
const vec4_t highlightColor = { 0.5f, 0.5f, 0.2f, 0.45f };
const int offset = g_consoleField.acOffset;
re.SetColor( highlightColor );
re.DrawStretchPic( con.xadjust + con.cw + offset * con.cw, y, length * con.cw, con.ch, 0, 0, 0, 0, cls.whiteShader );
re.DrawStretchPic( con.xadjust + (offset + 1) * (int)con.cw, y, length * (int)con.cw, (int)con.ch, 0, 0, 0, 0, cls.whiteShader );
}
}