Unit 'Intuition' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#aros]

SetPointer

Specify a pointer sprite image for a window.

Declaration

Source position: intuition.pas line 3232

procedure SetPointer(

  Window: PWindow;

  Pointer_: PWord;

  Height: LongInt;

  Width: LongInt;

  XOffset: LongInt;

  YOffset: LongInt

);

Arguments

Window

  

A pointer to the window to receive this pointer definition

Pointer_

  

A pointer to the data definition of a sprite

Height

  

The height of the pointer

Width

  

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

XOffset

  

The offset for your sprite from the mouse position

YOffset

  

The offset for your sprite from the mouse position

Description

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

SetWindowPointerA

  

Select a pointer for your window.

ClearPointer

  

Clear the mouse pointer definition from a window.


Documentation generated on: 2021-07-30