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

Function SetMouseCursorBusy

src/gfx.cpp:1690–1698  ·  view source on GitHub ↗

* Set or unset the ZZZ cursor. * @param busy Whether to show the ZZZ cursor. */

Source from the content-addressed store, hash-verified

1688 * @param busy Whether to show the ZZZ cursor.
1689 */
1690void SetMouseCursorBusy(bool busy)
1691{
1692 assert(!_cursor.sprites.empty());
1693 if (busy) {
1694 if (_cursor.sprites[0].image.sprite == SPR_CURSOR_MOUSE) SetMouseCursor(SPR_CURSOR_ZZZ, PAL_NONE);
1695 } else {
1696 if (_cursor.sprites[0].image.sprite == SPR_CURSOR_ZZZ) SetMouseCursor(SPR_CURSOR_MOUSE, PAL_NONE);
1697 }
1698}
1699
1700/**
1701 * Assign a single non-animated sprite to the cursor.

Callers 4

OnClickMethod · 0.85
CleanupGenerationFunction · 0.85
SaveFileStartFunction · 0.85
SaveFileDoneFunction · 0.85

Calls 2

SetMouseCursorFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected