mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 09:39:43 +01:00
Tweak IME selection background left bound
Just extending the selection background left by one pixel so there's not one pixel of black background to the left of a selection that starts at the beginning of the text, and so some characters being selected show up better (particularly where there's a long vertical bar at the first pixel). We shouldn't be overlapping any part of the previous character, since every character normally has a pixel of spacing on the right.
This commit is contained in:
parent
9ec8d8b637
commit
149f5fbebc
1 changed files with 5 additions and 1 deletions
|
@ -67,8 +67,12 @@ void ime_render(void)
|
|||
SDL_memcpy(in_sel, sel_start_ptr, in_sel_nbytes);
|
||||
in_sel[in_sel_nbytes] = '\0';
|
||||
|
||||
int before_sel_pixels = font::len(PR_FONT_LEVEL, before_sel);
|
||||
int before_sel_pixels = font::len(PR_FONT_LEVEL, before_sel) - 1;
|
||||
int in_sel_pixels = font::len(PR_FONT_LEVEL, in_sel);
|
||||
if (in_sel_pixels > 0)
|
||||
{
|
||||
in_sel_pixels += 1;
|
||||
}
|
||||
|
||||
SDL_Rect selrect = imebox;
|
||||
selrect.x += before_sel_pixels + 1;
|
||||
|
|
Loading…
Reference in a new issue