CreatePointer -- create a new mouse pointer (V4.0)
[id] = CreatePointer(id, type, ...)
[id] = CreatePointer(id, #SPRITE, srcid[, frame, spotx, spoty])
[id] = CreatePointer(id, #BRUSH, srcid[, spotx, spoty])
[id] = CreatePointer(id, #POINTER, ptrtype)
This function creates a new mouse pointer and assigns the identifier id to it. If you pass Nil in id, CreatePointer() will automatically choose a vacant identifier and return it. The mouse pointer object created by this function can be displayed later by calling the SetPointer() function. Mouse pointers can be created either from a sprite or brush source, or you can choose a predefined mouse pointer. The calling convention of CreatePointer() depends on the type you specify as the second argument.

For the types #SPRITE and #BRUSH you have to specify the identifier of the object that shall be used as the source for the pointer graphics. The mouse pointer created by this function is independent of the source object, so you can free the source object after calling CreatePointer().

If you specify #POINTER as the type, you have to provide an additional argument that defines which predefined mouse pointer image you want to obtain. Currently, this can be #STDPTR_SYSTEM for the system's standard pointer and #STDPTR_BUSY for the system's standard wait pointer.

The spotx and spoty arguments specify the hot spot inside the mouse pointer. The hot spot is the mouse pointer's pixel that is used to click. If the mouse pointer image is an arrow, then the hot spot is usually exactly at the tip of the arrow. If you do not specify the spotx & spoty arguments, CreatePointer() will use the center of the image as the hot spot.

Please note that not all systems can handle true colour mouse pointers. If the system does not support true colour mouse pointers, Hollywood will reduce the colors. Also, your image data might get scaled because some systems impose limits on the maximum mouse pointer size.

id for the mouse pointer or Nil for auto id selection
type from which to take the source data
further arguments depend on the type specified (see above)
optional: identifier of the mouse pointer; will only be returned when you pass Nil as argument 1 (see above)
CreatePointer(1, #BRUSH, 2, 0, 0)
The code above creates a new mouse pointer 1 from the brush with the id 2. The hot spot will be at position 0:0 (i.e. the top-left corner of the image). After creating the mouse pointer it will be displayed using SetPointer().

Show TOC