Skip to main content

Cursor

Description:

  Represents a hardware cursor.

release

Type: Function.

Description:

  Destroys the object's Lua reference. The object will be completely deleted if it's not referenced by any other LÖVE object or thread. This method can be used to immediately clean up resources without waiting for Lua's garbage collector.

Signature:

release: function(self: Cursor): boolean

Returns:

Return TypeDescription
booleanTrue if the object was released by this call, false if it had been previously released.

getType

Type: Function.

Description:

  Gets the type of the Cursor.

Signature:

getType: function(self: Cursor): CursorType

Returns:

Return TypeDescription
CursorTypeThe type of the Cursor.

type

Type: Function.

Description:

  Gets the type of the object as a string.

Signature:

type: function(self: Cursor): string

Returns:

Return TypeDescription
stringThe type as a string.

Of

Type: Function.

Description:

  Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true.

Signature:

typeOf: function(self: Cursor, type_name: string): boolean

Parameters:

ParameterTypeDescription
type_namestringThe name of the type to check for.

Returns:

Return TypeDescription
booleanTrue if the object is of the specified type, false otherwise.