ShowNativeHud

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

showNativeHud

AVAILABLE FROM UPDATE 0.1.7
This function is available in G1R:MP 0.1.7 and later. The contract below includes the compatibility guarantees introduced in that update.

Set this client resource's visibility policy for the six original native HUD groups; from 0.1.9 also crafting presentation. It does not disable the four native management menus.

Syntax

requestId = showNativeHud(visible)

Parameters

Name Type Required Description
visible boolean yes false hides all HUD groups; true releases this resource's HUD restrictions.

Returns

Positive numeric request ID if queued, or false if rejected. This is not an application acknowledgement.

Examples

local requestId = showNativeHud(false)
-- Later, restore only this resource's HUD policy:
showNativeHud(true)

Notes

  • Client-side only; the original API exists since 0.1.7. Crafting extensions require 0.1.9; use matching updated client/server versions.
  • See Native HUD and menus for asynchronous acknowledgements, resource ownership, input and restoration.
  • A positive request ID means queued, not applied. Listen for onClientNativeUiResult and inspect getNativeUiState.
  • Register the handler before submitting. Rapid changes coalesce: track the latest request ID, not every intermediate ID.
  • false restricts; true releases only the calling resource's restriction. Other resources remain respected.
  • This does not change inventory data, player attributes or custom RmlUi documents. Native save/load cannot be re-enabled.

Crafting presentation from 0.1.9

Available from 0.1.9. Use matching updated clients and server.

Native crafting UI documents the new crafting component, recipe/progress windows, preserved station entry/exit and prevention of invisible recipe starts. It is not a setNativeMenuEnabled key or a custom recipe API. getNativeUiState gains components.crafting, craftingReady, craftingGuardReady, craftingWidgets and craftingObserved; HUD bit 64 is appended, older bits unchanged. Existing resource ownership, asynchronous result handling and restoration still apply. Full station-by-station in-game qualification remains pending.