Hides mouse cursor in game window.
Takes no parameters.
Returns nothing.
Input
Parameters & Returns
Parameters
This function takes no parameters.
Returns
Void
Quick Summary
Hides mouse cursor in game window.
Takes no parameters.
Returns nothing.
Technical Exegesis...
Hides mouse cursor in game window. Takes no parameters. Returns nothing. Makes cursor invisible within window client area, commonly used for first-person camera controls and immersive gameplay.
Hides mouse cursor in game window. Takes no parameters. Returns nothing. Makes cursor invisible within window client area, commonly used for first-person camera controls and immersive gameplay.
Cursor visibility: cursor becomes invisible in window (hidden but still functional), mouse input still works (inpGetMouseX/Y and inpGetMouseXSpeed/YSpeed still function), cursor reappears when leaving window (system default cursor outside window), visibility persists until inpShowPointer called (or window loses focus).
Use cases: (1) First-person camera controls (hide cursor for FPS mouse look, immersive experience), (2) 3D camera rotation (hide cursor during mouse drag rotation, show when released), (3) Full-screen games (hide cursor during gameplay, show for menus/UI), (4) Custom cursor rendering (hide system cursor, draw custom cursor with graphics), (5) Center-lock mouse look (hide cursor, re-center with inpMoveMouse for infinite rotation).
Common patterns: FPS mode = inpHidePointer(): center cursor each frame; custom cursor = inpHidePointer(): b2dDrawImage(customCursor, inpGetMouseX(), inpGetMouseY()); toggle = If gameplayMode Then inpHidePointer() Else inpShowPointer(); temporary hide = inpHidePointer(): do rotation: inpShowPointer().
Center-locking: common technique for FPS games (infinite mouse movement), pattern: inpHidePointer() once at start, then each frame: read inpGetMouseXSpeed()/inpGetMouseYSpeed(), use deltas for camera rotation, call inpMoveMouse(centerX, centerY) to reset cursor, prevents cursor hitting window edges (enables infinite rotation without edge stops).
UI mode switching: show cursor for menus (inpShowPointer when opening menu), hide for gameplay (inpHidePointer when closing menu), toggle based on game state (gameplay=hidden, UI=visible), pattern: If menuOpen Then inpShowPointer() Else inpHidePointer().
Window focus: cursor automatically reappears when window loses focus (system behavior, user can access other windows), cursor re-hides when window regains focus if previously hidden (state persists), may need to re-hide on focus gain (handle window focus events if needed).
Performance: instant operation (~0.001ms, system call), safe to call per-frame (though typically called once or during state changes), no ongoing overhead (one-time visibility change).
Custom cursors: hide system cursor with inpHidePointer (make default cursor invisible), draw custom cursor sprite at inpGetMouseX/Y (render custom graphics), ensures only custom cursor visible (no double-cursor artifact).
Limitations: cursor still functional (input works normally, just invisible), cursor still constrained to window (unless using raw input or cursor locking), cursor may flicker on some systems (OS-dependent behavior), use inpShowPointer to restore visibility.
Related: inpShowPointer makes cursor visible again, inpMoveMouse repositions cursor programmatically, inpGetMouseXSpeed/YSpeed read mouse movement for camera control, inpGetMouseX/Y read cursor position.