This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
setcursorarea [2017/03/21 12:47] – korshun | setcursorarea [2017/05/29 14:58] (current) – removed korshun | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== SetCursorArea ====== | ||
- | {{tag> | ||
- | '' | ||
- | |||
- | ===== Description ===== | ||
- | Sets the size of the cursor coordinate system. The coordinate system used by the cursor matches the [[zdoom> | ||
- | |||
- | Cursor position is fully fixed-point, | ||
- | |||
- | 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 640x480 ('' | ||
- | |||
- | <note tip>Use the same coordinate system for both the cursor and the hud, like this: | ||
- | < | ||
- | SetCursorArea(640.0, | ||
- | SetHudSize(640, | ||
- | </ | ||
- | |||
- | Or, using [[: | ||
- | |||
- | < | ||
- | SetCursorArea(640.0, | ||
- | HudSetVirtualSize(640.0, | ||
- | </ | ||
- | </ | ||
- | |||
- | ===== Examples ===== | ||
- | < | ||
- | // The cursor is in the center of the screen. | ||
- | SetCursorArea(640.0, | ||
- | CursorX() -> 320.0 | ||
- | SetCursorArea(320.0, | ||
- | CursorX() -> 160.0 | ||
- | SetCursorArea(1.0, | ||
- | CursorX() -> 0.5 | ||
- | </ | ||
- | |||