MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Pointer_SetPosition

Function Pointer_SetPosition

src/Input.c:373–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373void Pointer_SetPosition(int idx, int x, int y) {
374 if (x == Pointers[idx].x && y == Pointers[idx].y) return;
375 /* TODO: reset to -1, -1 when pointer is removed */
376 Pointers[idx].x = x; Pointers[idx].y = y;
377
378 if (PointerHooks.MoveHook && PointerHooks.MoveHook(idx)) return;
379
380#ifdef CC_BUILD_TOUCH
381 if (Input_TouchMode && !(touches[idx].type & TOUCH_TYPE_GUI)) return;
382#endif
383 Event_RaiseInt(&PointerEvents.Moved, idx);
384}
385
386
387/*########################################################################################################################*

Callers 15

ClientWndProcFunction · 0.85
TryUpdateTouchFunction · 0.85
Input_AddTouchFunction · 0.85
Input_RemoveTouchFunction · 0.85
Window_ProcessEventsFunction · 0.85
SetMousePositionFunction · 0.85
HandleMouseDownFunction · 0.85
Window_ProcedureFunction · 0.85
Window_ProcessEventsFunction · 0.85
ProcessMouseFunction · 0.85
Window_ProcessEventsFunction · 0.85

Calls 1

Event_RaiseIntFunction · 0.85

Tested by

no test coverage detected