| 45 | int gotWheel = 0; |
| 46 | |
| 47 | void instruction() { |
| 48 | if (!gotClick) { printf("Please click on the canvas.\n"); return; } |
| 49 | if (!gotMouseDown) { printf("Please click on the canvas.\n"); return; } |
| 50 | if (!gotMouseUp) { printf("Please click on the canvas.\n"); return; } |
| 51 | if (!gotDblClick) { printf("Please double-click on the canvas.\n"); return; } |
| 52 | if (!gotMouseMove) { printf("Please move the mouse on the canvas.\n"); return; } |
| 53 | if (!gotWheel) { printf("Please scroll the mouse wheel.\n"); return; } |
| 54 | |
| 55 | if (gotClick && gotMouseDown && gotMouseUp && gotDblClick && gotMouseMove && gotWheel) { |
| 56 | printf("Test successful!\n"); |
| 57 | emscripten_force_exit(0); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | bool mouse_callback(int eventType, const EmscriptenMouseEvent *e, void *userData) { |
| 62 | printf("%s, screen: (%d,%d), client: (%d,%d),%s%s%s%s button: %hu, buttons: %hu, movement: (%d,%d), target: (%d, %d)\n", |
no test coverage detected