NativeUI
constNativeUI:object
Defined in: client/api.d.ts:3207
The game’s own Scaleform UI, opened from script. This is the second way to draw a UI at this client, beside Web: a web view is a browser and lays out anything, a native screen is composed out of the game’s own movies, sits inside the game’s own layer stack and is navigable with a controller.
Type Declaration
Section titled “Type Declaration”createScreen()
Section titled “createScreen()”createScreen(
options?):NativeScreen
Opens a screen. It is composed a few frames later, when its movie reports ready – listen for ready rather than drawing into it straight away.
Parameters
Section titled “Parameters”options?
Section titled “options?”library names which of the game’s movies the screen may attach exported sprites from, empty for the default. movie is a path inside this resource to a movie it ships, which opens a screen in that instead. assets are further files that movie loads, and layer is where it sits in the game’s own stack.
assets?
Section titled “assets?”string[]
layer?
Section titled “layer?”number
library?
Section titled “library?”string
movie?
Section titled “movie?”string
Returns
Section titled “Returns”The screen handle.
element()
Section titled “element()”element(
name,instanceId?):NativeElement
Takes a handle on one of the game’s own UI elements. Picking an instance id other than 0 gives a private copy of that element, which is how a mod puts its own content on a game screen without fighting the game’s copy.
Parameters
Section titled “Parameters”string
Element name, as the game’s own XML declares it: Menu, hud, ApseModalDialog and the rest.
instanceId?
Section titled “instanceId?”number
Which instance to drive; 0, the game’s own, by default.
Returns
Section titled “Returns”The element handle.
isMenuEnabled()
Section titled “isMenuEnabled()”isMenuEnabled(
menu):boolean
Whether every resource permits this vanilla menu. Native gameplay rules may still prevent it from opening. Throws for unknown menu names.
Parameters
Section titled “Parameters”"map" | "player" | "inventory" | "codex" | "journal" | "crafting"
The vanilla menu to query.
Returns
Section titled “Returns”boolean
True when no resource disables the menu.
libraries()
Section titled “libraries()”libraries():
object[]
Lists the game movies a screen can be opened against and the linkage names each one exports, read from the bundle rather than from a list kept in step by hand. name is what createScreen({library}) takes, and the empty one is the default host.
Returns
Section titled “Returns”object[]
One entry per bundled library.
setMenuEnabled()
Section titled “setMenuEnabled()”setMenuEnabled(
menu,enabled):void
Prevents a vanilla menu from opening or being selected through native navigation. An already-open disabled menu closes on the next client tick. Requests are idempotent and resource-owned: a menu stays disabled while any resource disables it. Restrictions clear when the resource stops or the session ends. Key bindings are unchanged. Tab labels remain in the native screen. The custom character creator can still use the player stage.
Parameters
Section titled “Parameters”"map" | "player" | "inventory" | "codex" | "journal" | "crafting"
The vanilla menu, including its detail pages.
enabled
Section titled “enabled”boolean
False prevents opening the menu; true releases this resource’s restriction. All menus are enabled by default.
Returns
Section titled “Returns”void