This is an old revision of the document!
void SetCursorArea(fixed width, fixed height)
Sets the size of the cursor coordinate system. The coordinate system used by the cursor matches the SetHudSize coordinate system exactly.
Cursor position is fully fixed-point, even SetCursorArea(1.0, 1.0)
will work correctly.
When this function is called, cursor position is changed so that the cursor remains in the same place on screen after coordinate system change.
The default size is 640×480 (SetCursorArea(640.0, 480.0)
).
SetCursorArea(640.0, 480.0); SetHudSize(640, 480, 0);
Or, using HudLib:
SetCursorArea(640.0, 480.0); HudSetVirtualSize(640.0, 480.0);
// The cursor is in the center of the screen. SetCursorArea(640.0, 480.0); CursorX() -> 320.0 SetCursorArea(320.0, 240.0); CursorX() -> 160.0 SetCursorArea(1.0, 1.0); CursorX() -> 0.5