equal
deleted
inserted
replaced
19 begin |
19 begin |
20 SDL_GetMouseState(@x, @y); |
20 SDL_GetMouseState(@x, @y); |
21 |
21 |
22 if(x <> cScreenWidth div 2) or (y <> cScreenHeight div 2) then |
22 if(x <> cScreenWidth div 2) or (y <> cScreenHeight div 2) then |
23 begin |
23 begin |
24 writeln(x, ', ', y); |
|
25 CursorPoint.X:= CursorPoint.X + x - cScreenWidth div 2; |
24 CursorPoint.X:= CursorPoint.X + x - cScreenWidth div 2; |
26 CursorPoint.Y:= CursorPoint.Y - y + cScreenHeight div 2; |
25 CursorPoint.Y:= CursorPoint.Y - y + cScreenHeight div 2; |
27 |
26 |
28 if cHasFocus then SDL_WarpMouse(cScreenWidth div 2, cScreenHeight div 2); |
27 if cHasFocus then SDL_WarpMouse(cScreenWidth div 2, cScreenHeight div 2); |
29 end |
28 end |