[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'Intuition' (#aros)


Specify a pointer sprite image for a window.


Source position: intuition.pas line 3232

procedure SetPointer(

  Window: PWindow;

  Pointer_: PWord;

  Height: LongInt;

  Width: LongInt;

  XOffset: LongInt;

  YOffset: LongInt





A pointer to the window to receive this pointer definition



A pointer to the data definition of a sprite



The height of the pointer



The width of the sprite (must be less than or equal to sixteen)



The offset for your sprite from the mouse position



The offset for your sprite from the mouse position


Sets up the window with the sprite definition for the pointer. Then, whenever the window is the active one, the pointer image will change to the window's version. If the window is the active one when this routine is called, the change takes place immediately.

The XOffset and YOffset parameters are used to offset the upper-left corner of the hardware sprite image from what Intuition regards as the current position of the pointer. Another way of describing it is as the offset from the "hot spot" of the pointer to the top-left corner of the sprite. For instance, if you specify offsets of zero, zero, then the top-left corner of your sprite image will be placed at the mouse position. On the other hand, if you specify an XOffset of -7 (remember, sprites are 16 pixels wide) then your sprite will be centered over the mouse position. If you specify an XOffset of -15, the right-edge of the sprite will be over the mouse position.

See also



Select a pointer for your window.



Clear the mouse pointer definition from a window.

Documentation generated on: 2017-01-10