| 2491 | } |
| 2492 | |
| 2493 | void MouseFunc(int b, int state, int x, int y) |
| 2494 | { |
| 2495 | switch (state) |
| 2496 | { |
| 2497 | case SDL_RELEASED: |
| 2498 | { |
| 2499 | g_lastx = x; |
| 2500 | g_lasty = y; |
| 2501 | g_lastb = -1; |
| 2502 | |
| 2503 | break; |
| 2504 | } |
| 2505 | case SDL_PRESSED: |
| 2506 | { |
| 2507 | g_lastx = x; |
| 2508 | g_lasty = y; |
| 2509 | g_lastb = b; |
| 2510 | #ifdef ANDROID |
| 2511 | extern void setStateLeft(bool bLeftDown); |
| 2512 | setStateLeft(false); |
| 2513 | #else |
| 2514 | if ((SDL_GetModState() & KMOD_LSHIFT) && g_lastb == SDL_BUTTON_LEFT) |
| 2515 | { |
| 2516 | // record that we need to update the picked particle |
| 2517 | g_mousePicked = true; |
| 2518 | } |
| 2519 | #endif |
| 2520 | break; |
| 2521 | } |
| 2522 | }; |
| 2523 | } |
| 2524 | |
| 2525 | void MousePassiveMotionFunc(int x, int y) |
| 2526 | { |
no test coverage detected