MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SetMouseCursor

Function SetMouseCursor

src/gfx.cpp:1706–1712  ·  view source on GitHub ↗

* Assign a single non-animated sprite to the cursor. * @param sprite Sprite to draw for the cursor. * @param pal Palette to use for recolouring. * @see SetAnimatedMouseCursor */

Source from the content-addressed store, hash-verified

1704 * @see SetAnimatedMouseCursor
1705 */
1706void SetMouseCursor(CursorID sprite, PaletteID pal)
1707{
1708 /* Turn off animation */
1709 _cursor.animate_timeout = 0;
1710 /* Set cursor */
1711 SetCursorSprite(sprite, pal);
1712}
1713
1714/**
1715 * Assign an animation to the cursor.

Callers 3

SetMouseCursorBusyFunction · 0.85
SetObjectToPlaceFunction · 0.85

Calls 1

SetCursorSpriteFunction · 0.85

Tested by

no test coverage detected