This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
functions:hudlib [2016/05/14 15:31] – [HudGetDistance] korshun | functions:hudlib [2016/08/10 15:28] – korshun | ||
---|---|---|---|
Line 8: | Line 8: | ||
Only drawing functions change ZDoom' | Only drawing functions change ZDoom' | ||
+ | |||
+ | ===== Examples ===== | ||
+ | |||
+ | ==== Simple 2D drawing ==== | ||
+ | |||
+ | < | ||
+ | HudSetPoint(320.0, | ||
+ | HudDrawText(1, | ||
+ | </ | ||
+ | |||
+ | ==== Simple 3D drawing ==== | ||
+ | |||
+ | < | ||
+ | HudSetCameraActor(0); | ||
+ | HudSetPoint3D(0.0, | ||
+ | HudDrawText(2, | ||
+ | </ | ||
===== Virtual screen size ===== | ===== Virtual screen size ===== | ||
Line 18: | Line 35: | ||
'' | '' | ||
- | Sets the virtual screen size to the given dimensions. The default size is 640x480. This works exactly like '' | + | Sets the virtual screen size to the given dimensions. The default size is 640x480. This works exactly like '' |
==== HudUseRealSize ==== | ==== HudUseRealSize ==== | ||
Line 210: | Line 227: | ||
'' | '' | ||
- | If set to true, the message will be shown to everyone, and not just to the activator. This settings | + | If set to true, the message will be shown to everyone, and not just to the activator. This setting |
==== HudSetLayer ==== | ==== HudSetLayer ==== | ||
Line 255: | Line 272: | ||
Default: (0, 0). | Default: (0, 0). | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | <note tip>If you want to do '' | ||
==== HudSetCameraActor ==== | ==== HudSetCameraActor ==== | ||
Line 285: | Line 306: | ||
Default: (0, 0). | Default: (0, 0). | ||
+ | |||
+ | ===== 3D Projection ===== | ||
+ | |||
+ | ==== HudSetProjectionMode ==== | ||
+ | '' | ||
+ | |||
+ | Sets the method to use when projecting 3D points to the screen. | ||
+ | |||
+ | Available modes are: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
===== 3D Distance ===== | ===== 3D Distance ===== | ||
Line 312: | Line 345: | ||
===== State management ===== | ===== State management ===== | ||
+ | |||
+ | You can save and retrieve hudlib states using these functions. The maximum amount of saved states is configured through ''# | ||
==== HudResetState ==== | ==== HudResetState ==== | ||
Line 325: | Line 360: | ||
Saves the current render state to a stack. | Saves the current render state to a stack. | ||
- | <note important> | + | <note important> |
==== HudPopState ==== | ==== HudPopState ==== | ||
'' | '' |