AddTileFromTemplate
From GECK
A function added by the JIP NVSE Plugin.
Contents
Description
Creates a new UI tile from a pre-defined Template, returning 1 on success. Function argument uses the following format:"componentPath|templateName|altTileName(optional)"
Syntax
(0, 1:int) AddTileFromTemplate "componentPath|templateName|altTileName" formatVars(up to 20)
Example
let iResult := AddTileFromTemplate "HUDMainMenu/myRect|myTemplate|myNewItem%g" 0
Example XML (for purposes of the example, injected in HUDMainMenu using UIO):
<rect name="myRect"> (...) </rect> <template name="myTemplate"> <rect name="myNewItem"> (...) </rect> </template>
Running the example above will add a new child rect under myRect using myNewItem definition, and named myNewItem0.
UnloadUIComponent "HUDMainMenu/myRect/myNewItem0"
The above will unload newly added component.