ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


setcursorarea

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
setcursorarea [2017/03/21 14:45] – created korshunsetcursorarea [2017/05/29 17:58] (current) – removed korshun
Line 1: Line 1:
-====== SetCursorArea ====== 
-{{tag>cursor}} 
-''void SetCursorArea(fixed width, fixed height)'' 
- 
-===== Description ===== 
-Sets the size of the cursor coordinate system. The coordinate system used by the cursor matches the [[zdoom>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 640x480 (''SetCursorArea(640.0, 480.0)''). 
- 
-===== Examples ===== 
-<code> 
-// 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 
-</code> 
- 
  
setcursorarea.1490100344.txt.gz · Last modified: 2017/03/21 14:45 by korshun