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.
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)
Parameter | Type | Default | Note |
---|---|---|---|
cursorName | string | ⚠️ required | |
alignToPixelGrid | boolean | false |
Get the current mouse cursor
cursorName = cursor()
Return | Type | Note |
---|---|---|
cursorName | string |
Define a new cursor
The hotpoint is the point where the cursor actually clicks in the screen coordinates.
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)
Parameter | Type | Default | Note |
---|---|---|---|
imageData | ImageData | ⚠️ required | |
cursorName | string | ⚠️ required | |
hotpointX | number | 0 | |
hotpointY | number | 0 |