ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


hud_coordinate_system

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
hud_coordinate_system [2017/04/18 16:35] korshunhud_coordinate_system [2017/04/18 16:38] korshun
Line 13: Line 13:
  
 To avoid specifying a width or height every time, you can call [[functions:HudSetVirtualSize]] once and then call [[functions:HudLeft]], [[functions:HudRight]], [[functions:HudTop]] and [[functions:HudBottom]]. To avoid specifying a width or height every time, you can call [[functions:HudSetVirtualSize]] once and then call [[functions:HudLeft]], [[functions:HudRight]], [[functions:HudTop]] and [[functions:HudBottom]].
 +
 +===== HUD borders =====
 +Borders are the areas of the screen that are not covered by the aforementioned rectangle. Horizontal and vertical border width can be retrieved using [[functions:HudBorderXFor]] and [[functions:HudBorderYFor]].
 +
 +As with screen boundaries, you can just call [[functions:HudSetVirtualSize]] once and then use [[functions:HudBorderX]] and [[functions:HudBorderY]] without specifying the size of the HUD coordinate system every time.
 +
 +===== Examples =====
 +
 +Put a message in the top left corner of the screen:
 +<code>
 +HudSetVirtualSize(640.0, 480.0);
 +x = HudLeft(); // This will be negative in widescreen.
 +y = 0.0;
 +</code>
 +
 +
hud_coordinate_system.txt · Last modified: 2017/04/18 16:39 by korshun