WoW:API SetCursor: Difference between revisions

revision
(revision)
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
Changes the current cursor graphic.
changed = SetCursor(cursor);


SetCursor(cursor);
==Arguments==
;cursor: String - one of the following graphic descriptors:
:* Path to a cursor graphic.
:* "XX_CURSOR", where XX is a capitalized version of a filename in the Interface\CURSORS folder.
:* Non-existent path; cursor is hidden.
:* nil; cursor is reset to default.


== Parameters ==
== Returns ==
 
;changed : 1 if cursor graphic is changed, nil otherwise.
=== Arguments ===
 
;cursor: String - Can be one of these:
:* "ATTACK_CURSOR"
:* "ATTACK_ERROR_CURSOR"
:* "BUY_CURSOR"
:* "BUY_ERROR_CURSOR"
:* "CAST_CURSOR"
:* "CAST_ERROR_CURSOR"
:* "POINT_CURSOR"
:* "POINT_ERROR_CURSOR"
 
:* nil - resets cursor
 
:* A path to a 32x32 cursor graphic
 
 
=== Returns ===
:* 1 - if succesful, otherwise nil


== Details ==
== Details ==
* The option to pass ''nil'' was added in 1.11.
* The option to pass ''nil'' was added in 1.11.
* For custom textures: The graphic must be an UNCOMPRESSED BLP file
* For custom textures: The graphic must be an UNCOMPRESSED BLP file; compressed BLP files will only work for software cursors.
* For custom textures: Compressed BLP files will work for software, but not hardware cursors.
* If the cursor is hovering over WorldFrame, the SetCursor function will have no effect - cursor is locked to reflect what the player is currently pointing at.