---
name: "set_mouse_sprite"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/set_mouse_sprite/3alleg4"
---

# set\_mouse\_sprite(3alleg4)

Sets the mouse sprite. Allegro game programming library.

## NAME

set\_mouse\_sprite - Sets the mouse sprite. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void set\_mouse\_sprite(BITMAP \*sprite);**

## DESCRIPTION

You don't like Allegro's mouse pointer? No problem. Use this function to supply an alternative of your own. If you change the pointer and then want to get Allegro's lovely arrow back again, call set\_mouse\_sprite(NULL).

As a bonus, set\_mouse\_sprite(NULL) uses the current palette in choosing colors for the arrow. So if your arrow mouse sprite looks ugly after changing the palette, call set\_mouse\_sprite(NULL).

## SEE ALSO

**install\_mouse**(3alleg4), **show\_mouse**(3alleg4), **set\_mouse\_sprite\_focus**(3alleg4), **exmouse**(3alleg4)
