[id] = CreatePointer(id, type, ...) [id] = CreatePointer(id, #SPRITE, srcid[, frame, spotx, spoty]) [id] = CreatePointer(id, #BRUSH, srcid[, spotx, spoty]) [id] = CreatePointer(id, #POINTER, ptrtype)
idto it. If you pass Nil in
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
#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
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
#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
CreatePointer() will use the center of the image as the hot
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.
CreatePointer(1, #BRUSH, 2, 0, 0) SetPointer(1)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().