• Reference
  • LUA API
  • Classes
  • UI Prefab

UI Prefab

UI Prefab can be used in conjunction with UI, and multiple UI modules can be used.

Functions

get_lua_ui_prefab_from_py

Get the interface instance of lua layer from the interface instance of py layer.

Parameters

VariableTypeDescription
py_ui_prefabstring

Return

TypeDescription
tableReturns the lua layer skill instance after initialization in the lua layer.
ui_prefab.get_lua_ui_prefab_from_py(player, py_ui_prefab)

create_ui_prefab_instance

Create an interface module instance.

Parameters

VariableTypeDescription
playerplayerCreated player.
prefab_typeuiPrefab module.
uiuiInterface assembly.

Return

TypeDescription
uiInterface module instance.
ui_prefab.create_ui_prefab_instance(player, prefab_type, ui)

set_show_room_background_color

Set the background color of the interface model control.

Parameters

VariableTypeDescription
rnumberColor value.
gnumberColor value.
bnumberColor value.
anumberTransparency.
ui_prefab:set_show_room_background_color(r, g, b, a)

remove_ui_prefab

Example of removing an interface module.

ui_prefab:remove_ui_prefab()

get_ui_prefab_child_by_path

Get the controls under the interface module instance by the interface module path.

Parameter

VariableTypeDescription
pathstringPath.

Return

TypeDescription
ui
ui_prefab:get_ui_prefab_child_by_path(path)