EVENT DISPLAYCURSOR: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Mblackwell (talk | contribs)
Created page with "'''EVENT_DISPLAYCURSOR''' is a Game Event. This event is called when the menu cursor is being displayed. Gamevar RETURN is set to the cursor's..."
 
mNo edit summary
Line 5: Line 5:
Gamevar [[RETURN]] is set to the cursor's [[picnum]]. Modifying this value will allow the game to handle positioning duties itself, etc. Setting RETURN to -1 disables hardcoded drawing of the cursor completely.
Gamevar [[RETURN]] is set to the cursor's [[picnum]]. Modifying this value will allow the game to handle positioning duties itself, etc. Setting RETURN to -1 disables hardcoded drawing of the cursor completely.


For this event, treat [[userdef.return]] as an additional information array.
For this event, treat [[return_(userdef)]] as an additional information array.
== Return Values ==
== Return Values ==



Revision as of 08:42, 3 August 2021

EVENT_DISPLAYCURSOR is a Game Event.

This event is called when the menu cursor is being displayed.

Gamevar RETURN is set to the cursor's picnum. Modifying this value will allow the game to handle positioning duties itself, etc. Setting RETURN to -1 disables hardcoded drawing of the cursor completely.

For this event, treat return_(userdef) as an additional information array.

Return Values

userdef.return 0
Same as RETURN.
userdef.return 1
The X position of the cursor (16bit positioning).
userdef.return 2
The Y position of the cursor (16bit positioning).
userdef.return 3
The alpha transparency of the cursor (0-255).

Notes

If you use the above return values to display your own cursor, with new layers or sizes, OR orientation 2048 into your drawing command.