This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
hud_library [2017/04/18 16:13] – korshun | hud_library [2017/07/09 14:24] – korshun | ||
---|---|---|---|
Line 10: | Line 10: | ||
</ | </ | ||
- | The only drawing functions in HUD Library are [[functions: | + | The only drawing functions in HUD Library are [[functions: |
===== Scaling ===== | ===== Scaling ===== | ||
Scaling is implemented by calling SetHudSize with values that don't match those set in [[functions: | Scaling is implemented by calling SetHudSize with values that don't match those set in [[functions: | ||
+ | |||
+ | 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 ===== | ===== 3D messages ===== | ||
HUD Library supports an accurate projection of 3D messages. 3D messages are correctly projected in [[hud_library_state# | 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: |