Here is an example:
HudResetState(); // Just like calling SetFont and SetHudSize before HudMessage. HudSetPoint(320.0, 240.0); HudDrawText(1, "Hello");
The only drawing functions in HUD Library are HudDrawText and HudDrawImage. They call SetHudSize, SetFont and then HudMessage(Bold) every time a message is drawn. This means that if you are mixing HUD Library with HudMesasge, then, after calling one of HudDraw* functions, your SetHudSize and SetFont settings are lost and you need to set them back.
HudResetState(); HudSetVirtualSize(640.0, 480.0); HudSetScale(0.5); HudDrawText(1, "Hello")
Will result in the following sequence of calls to ZDoom's functions:
SetFont("SMALLFONT"); // Default HUD Library font SetHudSize(1280, 1024, 0); // To implement 0.5 scale HudMessage(s:"Hello"; HUDMSG_PLAIN, 1, etc);
HUD Library supports an accurate projection of 3D messages. 3D messages are correctly projected in both software and OpenGL renderers.
HudResetState(); HudSetPoint3D(x, y, z); HudSetCameraActor(0); // Set HUD Library camera to match the activator HudDrawText(1, "Look here!")
By default, 3D messages are automatically scaled with distance. You can disable this setting using HudSetAutoDistanceScale.