SetNativeHudComponentVisible: Difference between revisions
Document native HUD/menu Lua APIs available since 0.1.7; client BUILD202 and save/load protection |
Release 0.1.9 / BUILD264 / Protocol42: availability and download setup; preserve experimental limits |
||
| (One intermediate revision by the same user not shown) | |||
| Line 16: | Line 16: | ||
! Name !! Type !! Required !! Description | ! Name !! Type !! Required !! Description | ||
|- | |- | ||
| <code>component</code> || <code>string</code> || yes || bars, crosshair, interaction, hotbar, notifications, combat_markers, or all (case-sensitive). | | <code>component</code> || <code>string</code> || yes || bars, crosshair, interaction, hotbar, notifications, combat_markers, or all (case-sensitive). From 0.1.9: also crafting; all includes it. | ||
|- | |- | ||
| <code>visible</code> || <code>boolean</code> || yes || false hides the group; true releases this resource's restriction. | | <code>visible</code> || <code>boolean</code> || yes || false hides the group; true releases this resource's restriction. | ||
| Line 31: | Line 31: | ||
== Notes == | == Notes == | ||
* Client-side only; | * 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. | * 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]]. | * A positive request ID means queued, not applied. Listen for [[onClientNativeUiResult]] and inspect [[getNativeUiState]]. | ||
| Line 41: | Line 41: | ||
[[Category:Client Functions]] | [[Category:Client Functions]] | ||
[[Category:GUI Functions]] | [[Category:GUI Functions]] | ||
<!-- crafting019:start --> | |||
== 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. | |||
<!-- crafting019:end --> | |||
Latest revision as of 13:29, 20 October 2026
setNativeHudComponentVisible
Hide or release one native HUD group without removing the native UI root.
Syntax
requestId = setNativeHudComponentVisible(component, visible)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
component |
string |
yes | bars, crosshair, interaction, hotbar, notifications, combat_markers, or all (case-sensitive). From 0.1.9: also crafting; all includes it. |
visible |
boolean |
yes | false hides the group; true releases this resource's restriction. |
Returns
Positive numeric request ID if queued, or false if rejected. This is not an application acknowledgement. Unknown component keys return false.
Examples
setNativeHudComponentVisible("bars", false)
setNativeHudComponentVisible("interaction", false)
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.