A cursor can be:
- Windows: Up to 256x256.
On select old configurations, cursors above 64x64 do not show up. - HTML5: Up to 128x128.
MDN warns that this is entirely up to the browser and "unfitting" cursors will be ignored.
Hotspot (hpx/hpy) is an equivalent of an origin for the cursor.
FPS
is animation speed in frames per second.
Creates and returns a new empty cursor.
Destroys a previously created cursor.
Buffer conversions:
Creates a cursor from a buffer containing RGBA pixel data.
Adds a frame to a cursor from a buffer containing RGBA pixel data.
Surface conversions:
Creates a cursor from a surface.
Adds a frame to a cursor from a surface.
Loading native cursors from files:
Loads a cursor from a file.
Note: This takes a CUR
/ANI
file, not an image.
Note: An ANI
cursor doesn't currently get split into frames on load, so trying to append frames to it will not work like you expect.
Appends a frame to a cursor from a file.
Note: This takes a CUR
/ANI
file, not an image.
Note: An ANI
cursor doesn't currently get split into frames on load, so trying to append frames to it will not work like you expect.
Sprite conversions:
Creates a cursor from a sprite.
If frame
is not specified or is undefined
, all frames will be added.
Otherwise a single frame is used.
If fps
is not specified, game's framerate is used.
Like above, but with scale/color/alpha.
You can use gpu_set_texfilter
(GMS2) or texture_set_interpolation
(GMS1) to control how the images will be scaled.
Adds a sprite frame to a cursor.