HUD integration

Config.Hud hides your HUD while the pause menu — or the native map / settings frontend — is open, then restores it on close. It works with any HUD resource: you point it at yours.
Nothing is ever called unless Config.Hud.Resource is actually started. A name that doesn't exist on your server just disables the integration silently instead of erroring.

Options

KeyDefaultDescription
EnabledtrueMaster switch.
Resource'HZ-Hud'The resource that owns your HUD. Used for the started-check and as the export target. "" skips the check (fires regardless).
Method'event''event' or 'export' — how HZ-PauseMenu talks to your HUD.
HideRadarfalseAlso drop the minimap while the menu is open.
CustomnilA function (visible) that runs instead of the above. Not editable from a panel.

Method: event

Fires two events on your HUD:

Method    = 'event',
HideEvent = 'HZ-Hud:client:hideHUD',
ShowEvent = 'HZ-Hud:client:showHud',

This is the HZ-Hud default — preferred over its export because these events also drop/restore the radar and reset the HUD's internal caches.


Method: export

Calls one export taking a single boolean meaning "HUD visible":

Method   = 'export',
Export   = 'SetVisible',   -- exports[Resource]:SetVisible(visible)

Examples:

HUDResourceExport
HZ-HudHZ-HudSetVisible
qs-interfaceqs-interfaceToggleHud

Custom hook

For a HUD that fits neither shape, provide a function. visible is false when the menu opens and true when it closes. HideRadar still applies.

Custom = function(visible)
    exports['my-hud']:Whatever(visible)
    TriggerEvent('my-hud:toggle', visible)
end,