HudMessage layers
Availability
ZandroX behaviour.
HUDMSG_LAYER_FUA_TOPexists only on ZandroX. Other ports draw such a message on the default layer, as they draw any layer they don't know, so a mod that uses it still loads and shows its messages everywhere.
| Layer | Value | Drawn |
|---|---|---|
HUDMSG_LAYER_UNDERHUD |
0x00001000 |
under the status bar |
HUDMSG_LAYER_OVERHUD |
0x00000000 |
over the status bar (the default) |
HUDMSG_LAYER_OVERMAP |
0x00002000 |
over the automap, while it is open |
HUDMSG_LAYER_FUA_TOP |
0x00003000 |
over the co-op info and the name of the player under the crosshair |
HUDMSG_LAYER_FUA_TOP is declared in zt-bcc's zcommon.bcs, and for ACC in fua.acs
(Compiling ACS).
Usage
In co-op and team games each player's screen lists their teammates down its top corners: their names, health,
armour and weapon, drawn after every HudMessage. A menu built from HudMessages has that text written over it.
A message on HUDMSG_LAYER_FUA_TOP is drawn after it, so the menu's panels cover it:
SetHudSize( 640, 480, 0 );
SetFont( "MENUBACK" );
HudMessage( s:"A"; HUDMSG_PLAIN | HUDMSG_LAYER_FUA_TOP, 900, CR_UNTRANSLATED, 320.0, 240.0, 0 );
- Add it as a layer, alongside the other flags. Combine it with
HUDMSG_ALPHA,HUDMSG_ADDBLEND, the visibility flags and the rest, as with any other layer. - Still under the game's own screens. The scoreboard, medals, chat, menus and console stay on top.
- Ids keep their order within a layer. A lower id draws in front of a higher one, as on every layer; replacing a message by its id moves it to the new message's layer.
- Savegames keep it, as they keep every layer.
- Only what is on the layer moves up: a translucent panel still lets the co-op text show through it.
Online
- A server's
HudMessageandHudMessageBoldreach clients on this layer, and a clientside script's draw on it locally. Nothing changed on the wire: the layer's two bits were already sent.