This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| hud_library [2017/04/17 13:46] – korshun | hud_library [2017/07/09 11:26] (current) – korshun | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== HUD Library ====== | ====== HUD Library ====== | ||
| + | HUD Library is an advanced replacement for [[zdoom> | ||
| + | Here is an example: | ||
| + | |||
| + | < | ||
| + | HudResetState(); | ||
| + | HudSetPoint(320.0, | ||
| + | HudDrawText(1, | ||
| + | </ | ||
| + | |||
| + | The only drawing functions in HUD Library are [[functions: | ||
| + | |||
| + | ===== Scaling ===== | ||
| + | |||
| + | Scaling is implemented by calling [[zdoom> | ||
| + | |||
| + | For example: | ||
| + | |||
| + | < | ||
| + | HudResetState(); | ||
| + | HudSetVirtualSize(640.0, | ||
| + | HudSetScale(0.5); | ||
| + | HudDrawText(1, | ||
| + | </ | ||
| + | |||
| + | Will result in the following sequence of calls to ZDoom' | ||
| + | < | ||
| + | SetFont(" | ||
| + | SetHudSize(1280, | ||
| + | HudMessage(s:" | ||
| + | </ | ||
| + | |||
| + | ===== 3D messages ===== | ||
| + | HUD Library supports an accurate projection of 3D messages. 3D messages are correctly projected in [[hud_library_state# | ||
| + | |||
| + | Example: | ||
| + | |||
| + | < | ||
| + | HudResetState(); | ||
| + | HudSetPoint3D(x, | ||
| + | HudSetCameraActor(0); | ||
| + | HudDrawText(1, | ||
| + | </ | ||
| + | |||
| + | [[functions: | ||
| + | |||
| + | By default, 3D messages are automatically scaled with distance. You can disable this setting using [[functions: | ||
| + | |||
| + | ===== State operations ===== | ||
| + | The whole [[HUD Library state]] can be reset to default using [[functions: | ||