AttachUIComponent

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Generates UI components from a formatted string and attaches them at the specified NiNode of the calling reference's loaded 3D model.

Notes

  • The name of the target NiNode (1st argument) is case-sensitive.
  • If the components were successfully generated and attached, the function returns 1 (otherwise, 0).
  • The attached components can be manipulated using any of the available (and applicable) UI functions.
  • Internally, the components are injected into HUDMainMenu menu root.
  • The component must be composed of a single rect parent, with all the other components as its children.
  • To remove the attached components, use UnloadUIComponent.
  • This function should be considered EXPERIMENTAL, and may change considerably (or be scrapped, altogether) in the future.

Syntax

[help]
(successful:0/1) reference.AttachUIComponent targetNode:string component:formattedString formatVars(up to 20)

Example

objectRef.AttachUIComponent "AttachXMLNode" "<rect name=%qAttach_Rect%q><text name=%q%z%q></text></rect>" sTextName 

See Also