This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| hud_coordinate_system [2017/04/17 14:39] – korshun | hud_coordinate_system [2017/04/18 13:39] (current) – korshun | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== HUD coordinate system ====== | ====== HUD coordinate system ====== | ||
| - | ZDoom uses a special coordinate system for [[zdoom> | + | ZDoom uses a special coordinate system for [[zdoom> |
| + | |||
| + | The HUD coordinate system' | ||
| + | |||
| + | ACSUtils provides functions to correctly work with the HUD coordinate system. | ||
| + | |||
| + | <note important> | ||
| + | |||
| + | ===== Retrieve aspect ratio ===== | ||
| + | [[functions: | ||
| + | |||
| + | ===== Actual screen boundaries ===== | ||
| + | [[functions: | ||
| + | |||
| + | To avoid specifying a width or height every time, you can call [[functions: | ||
| + | |||
| + | ===== 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: | ||
| + | |||
| + | As with screen boundaries, you can just call [[functions: | ||
| + | |||
| + | ===== Examples ===== | ||
| + | |||
| + | Put a message in the top left corner of the screen: | ||
| + | < | ||
| + | HudSetVirtualSize(640.0, | ||
| + | x = HudLeft(); // This will be negative in widescreen. | ||
| + | y = 0.0; | ||
| + | </ | ||
| + | |||