1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Merge pull request #2699 from zsilencer/bugfixes

Fix #2693: Chat caret
This commit is contained in:
Ted John
2016-01-11 18:49:18 +00:00

View File

@@ -89,13 +89,15 @@ void chat_draw()
safe_strncpy(lineCh, _chatCurrentLine, CHAT_INPUT_SIZE);
y = _chatBottom - 10;
gfx_set_dirty_blocks(x, y, x + gfx_get_string_width(lineBuffer) + 7, y + 12);
gfx_draw_string(dpi, lineBuffer, 255, x, y);
if (_chatCaretTicks < 15) {
memcpy(lineBuffer, _chatCurrentLine, gTextInputCursorPosition);
lineBuffer[gTextInputCursorPosition] = 0;
int caretX = x + gfx_get_string_width(lineBuffer);
int caretY = y + 10;
gfx_fill_rect(dpi, caretX, caretY, caretX + 6, caretY + 1, 0x38);
}
gfx_draw_string(dpi, lineBuffer, 255, x, y);
}
}