NativeUI
Client only. Works with the game's Scaleform (Flash) interface. element() controls an existing interface element, and createScreen() builds your own screen in the game's style. Calls that give an answer go to the game and return about a frame later.
nativeUI.element()
NativeUI.element(elementName, instanceId = 0)An object for one of the game's interface elements, by name, such as HUD or Menu.
nativeUI.createScreen()
NativeUI.createScreen(options = {})Opens your own screen: a game movie with an empty root clip to build on, or a movie your resource ships. Wait for 'ready' before building.
nativeUI.libraries()
NativeUI.libraries(names = DEFAULT_LIBRARIES)The symbols game movies export for NativeClip.attach, as { name, movie, exports } per element, or null if unreadable.
nativeUI.setMenuEnabled()
NativeUI.setMenuEnabled(menu, enabled)Sets whether the player can open a game menu page: 'crafting', 'inventory', 'player', 'map', 'codex' or 'journal'. A page stays closed while any resource disables it.
nativeUI.isMenuEnabled()
NativeUI.isMenuEnabled(menu)Whether a menu page can be opened.
nativeUI.addMenuButton()
NativeUI.addMenuButton(label, handler)Adds your resource's button to the game's Esc menu, above 'Report a bug', each time it opens. A click calls the handler with the button's id. The menu has room for two, so it returns null when both are taken.
nativeUI.removeMenuButton()
NativeUI.removeMenuButton(id)Removes one of your resource's Esc menu buttons. Returns false for any other id.