MCPcopy Create free account
hub / github.com/defold/defold / LuaNewBoxNode

Function LuaNewBoxNode

engine/gui/src/gui_script.cpp:1704–1710  ·  view source on GitHub ↗

creates a new box node * Dynamically create a new box node. * * @name gui.new_box_node * @param pos [type:vector3|vector4] node position * @param size [type:vector3] node size * @return node [type:node] new box node */

Source from the content-addressed store, hash-verified

1702 * @return node [type:node] new box node
1703 */
1704 static int LuaNewBoxNode(lua_State* L)
1705 {
1706 Point3 pos = GetPositionFromArgumentIndex(L, 1);
1707 Vector3 size = *dmScript::CheckVector3(L, 2);
1708 Scene* scene = GuiScriptInstance_Check(L);
1709 return LuaDoNewNode(L, scene, pos, size, NODE_TYPE_BOX, 0, 0, 0x0);
1710 }
1711
1712 /*# creates a new text node
1713 * Dynamically create a new text node.

Callers

nothing calls this directly

Calls 4

CheckVector3Function · 0.85
GuiScriptInstance_CheckFunction · 0.85
LuaDoNewNodeFunction · 0.85

Tested by

no test coverage detected