ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


hud_library

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
hud_library [2017/04/18 16:16] korshunhud_library [2017/04/18 16:23] korshun
Line 15: Line 15:
  
 Scaling is implemented by calling SetHudSize with values that don't match those set in [[functions:HudSetVirtualSize]].  Scaling is implemented by calling SetHudSize with values that don't match those set in [[functions:HudSetVirtualSize]]. 
 +
 +For example:
 +
 +<code>
 +HudResetState();
 +HudSetVirtualSize(640.0, 480.0);
 +HudSetScale(0.5);
 +HudDrawText(1, "Hello")
 +</code>
 +
 +Will result in the following sequence of calls to ZDoom's functions:
 +<code>
 +SetFont("SMALLFONT"); // Default HUD Library font
 +SetHudSize(1280, 1024, 0); // To implement 0.5 scale
 +HudMessage(s:"Hello"; HUDMSG_PLAIN, 1, etc);
 +</code>
  
 ===== 3D messages ===== ===== 3D messages =====
Line 32: Line 48:
 By default, 3D messages are automatically scaled with distance. You can disable this setting using [[functions:HudSetAutoDistanceScale]]. By default, 3D messages are automatically scaled with distance. You can disable this setting using [[functions:HudSetAutoDistanceScale]].
  
 +===== Saving and loading state ===== 
 +The whole [[HUD Library state]] can be saved and loaded using [[HudPushState]] and [[HudLoadState]].
hud_library.txt · Last modified: 2017/07/09 14:26 by korshun