This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cursor_library [2017/07/14 18:17] – korshun | cursor_library [2017/07/14 18:40] (current) – korshun | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Cursor library ====== | ====== Cursor library ====== | ||
| The ACSUtils cursor library allows mods to easily add mouse cursor support. | The ACSUtils cursor library allows mods to easily add mouse cursor support. | ||
| + | |||
| + | It fully supports wide screens and takes into account all mouse settings of the user to provide consistent cursor support regardless of aiming settings. | ||
| + | |||
| + | <note important> | ||
| + | - serverside cursors are very laggy. | ||
| + | - cursor library can't read user's mouse settings to adjust cursor speed and direction. | ||
| + | - cursor library can't read user's aspect ratio to find correct screen boundaries. | ||
| + | </ | ||
| ===== Basic usage ===== | ===== Basic usage ===== | ||
| Line 9: | Line 17: | ||
| { | { | ||
| UpdateCursor(); | UpdateCursor(); | ||
| + | | ||
| + | SetHudSize(640, | ||
| // Draw cursor at CursorX(), CursorY() | // Draw cursor at CursorX(), CursorY() | ||
| Delay(1); | Delay(1); | ||
| Line 15: | Line 25: | ||
| </ | </ | ||
| - | [[functions: | + | [[functions: |
| + | |||
| + | <note tip>The cursor library does not draw the cursor for you. You can draw it manually using [[zdoom> | ||
| + | |||
| + | ===== Advanced features ===== | ||
| + | |||
| + | ==== Getting cursor motion ==== | ||
| + | |||
| + | [[functions: | ||
| + | |||
| + | [[functions: | ||
| + | |||
| + | ==== Setting coordinate system scale ==== | ||
| + | |||
| + | [[functions: | ||
| + | |||
| + | Calling [[functions: | ||
| + | |||
| + | ==== Moving the cursor ==== | ||
| + | |||
| + | [[functions: | ||
| + | |||
| + | ==== Changing cursor speed ==== | ||
| + | |||
| + | [[functions: | ||
| + | |||
| + | ==== Cursor wraparound ==== | ||
| + | |||
| + | [[functions: | ||
| + | |||
| + | |||
| + | |||
| + | |||