Skip to main content

Miscellaneous

Miscellaneous features related to graphics but couldn't be categorized into a specific topic.

flip

Wait till the screen is applied and shown to the user. Helpful when doing some loading operations.

flip()

cursor

Set the current active mouse cursor or create a new one.

By default, the cursor is free from the pixelated screen, as it can set in a place between 2 pixels. This was to keep the smooth movement of the mouse, at the cost of losing some of the retro feeling.

info

DiskOS provides a set of standard cursors which are: normal, handrelease, handpress, hand, cross, point, draw, normal_while, pencil, bucket, eraser and picker.

Set the current mouse cursor

cursor(cursorName, alignToPixelGrid)
ParameterTypeDefaultNote
cursorNamestring⚠️ required
alignToPixelGridbooleanfalse

Get the current mouse cursor

cursorName = cursor()
ReturnTypeNote
cursorNamestring

Define a new cursor

The hotpoint is the point where the cursor actually clicks in the screen coordinates.

danger

Overriding any of the standard cursors would override for DiskOS. And thus a LIKO-12 reboot would be required to reload the original ones.

cursor(imageData, cursorName, hotpointX, hotpointY)
ParameterTypeDefaultNote
imageDataImageData⚠️ required
cursorNamestring⚠️ required
hotpointXnumber0
hotpointYnumber0