ResetNativeUi

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

resetNativeUi

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.

Release all native HUD and management-menu restrictions owned by the calling resource. Other resources and permanent multiplayer save/load protections remain active.

Syntax

requestId = resetNativeUi()

Parameters

This function does not accept parameters.

Returns

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

Examples

local requestId = resetNativeUi()
-- Close your own GUI and remove your own bindings separately.

Notes

  • Client-side only; available since 0.1.7. Use client BUILD202 or newer with a compatible Protocol 39 server.
  • See Native HUD and menus for asynchronous acknowledgements, resource ownership, input and restoration.
  • Resource shutdown also releases its restrictions. Reset does not force normally hidden native widgets visible.
  • An acknowledgement may arrive asynchronously; check onClientNativeUiResult and getNativeUiState.