code text selection

This commit is contained in:
BADIM-PC\Vadim 2018-02-12 14:59:14 +03:00
parent 0bbda15e1c
commit 3233d48861
1 changed files with 12 additions and 10 deletions

View File

@ -996,6 +996,8 @@ static void processGestures(Code* code)
static void processMouse(Code* code)
{
tic_mem* tic = code->tic;
if(checkMousePos(&code->rect))
{
setCursor(tic_cursor_ibeam);
@ -1024,16 +1026,16 @@ static void processMouse(Code* code)
char* position = code->cursor.position;
setCursorPosition(code, x + code->scroll.x, y + code->scroll.y);
// if(SDL_GetModState() & KMOD_SHIFT)
// {
// code->cursor.selection = code->cursor.position;
// code->cursor.position = position;
// }
// else if(!code->cursor.mouseDownPosition)
// {
// code->cursor.selection = code->cursor.position;
// code->cursor.mouseDownPosition = code->cursor.position;
// }
if(tic->api.key(tic, tic_key_shift))
{
code->cursor.selection = code->cursor.position;
code->cursor.position = position;
}
else if(!code->cursor.mouseDownPosition)
{
code->cursor.selection = code->cursor.position;
code->cursor.mouseDownPosition = code->cursor.position;
}
}
else
{