Difference between revisions of "InjectUIComponent"
Jump to navigation
Jump to search
imported>Jazzisparis (Created page with "{{Function |origin = JIP |summary = Injects the contents of a formatted string into a menu, at <i>componentPath</i> (see Notes, below). |name = InjectUIComponent |returnT...") |
imported>Jazzisparis |
||
Line 30: | Line 30: | ||
*[[InjectUIXML]] | *[[InjectUIXML]] | ||
[[Category:Functions_(JIP)]] | [[Category:Functions_(JIP)]] | ||
[[Category:UI Functions (JIP)]] |
Latest revision as of 14:46, 30 March 2015
< [[::Category:Functions|Category:Functions]]
A function added by the JIP NVSE Plugin.
Description
Injects the contents of a formatted string into a menu, at componentPath (see Notes, below).
Syntax
(successful:0/1) InjectUIComponent componentPath:string component:formattedString formatVars(up to 20)
Example
InjectUIComponent "HUDMainMenu" "<_Var1>%g</_Var1> <text name=%qTestText%q> <_Var2> <copy src=%qparent()%q trait=%q_Var1%q/> </_Var2> </text>" intVar
InjectUIComponent "StartMenu\NOGLOW_BRANCH" "<rect name=%qTestRect%q> <image name=%qTestImage%q> <text name=%q%z%q> </text> </image> </rect>" strVar
Notes
- component supports format specifiers, and up to 20 variables may be used.
- The new components are injected directly into the game's memory - no files on disk are modified (or even accessed).
- Once injected, all UI functions can be used on the new components.
- Most menus are loaded in memory only while open, and are unloaded when closed. This means:
- New components will be injected successfully only if the target menu is currently loaded.
- New components must be re-injected every time the target menu is re-loaded. The only exceptions are the following menus, which are always loaded (and are never re-loaded): HUDMainMenu, InventoryMenu, MapMenu, RepairMenu, StatsMenu, ItemModMenu.