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

Function LuaCheckNodeInternal

engine/gui/src/gui_script.cpp:340–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338 }
339
340 static InternalNode* LuaCheckNodeInternal(lua_State* L, int index, HNode* hnode)
341 {
342 NodeProxy* np = NodeProxy_Check(L, index);
343 if (np->m_Scene != GetScene(L))
344 luaL_error(L, "Node used in the wrong scene");
345 if (IsValidNode(np->m_Scene, np->m_Node))
346 {
347 InternalNode*n = GetNode(np->m_Scene, np->m_Node);
348 if (hnode)
349 *hnode = np->m_Node;
350 return n;
351 }
352 else
353 {
354 luaL_error(L, "Deleted node");
355 }
356
357 return 0; // Never reached
358 }
359
360 HNode LuaCheckNode(lua_State* L, int index)
361 {

Callers 15

LuaCheckNodeFunction · 0.85
NodeProxy_indexFunction · 0.85
NodeProxy_newindexFunction · 0.85
NodeProxy_eqFunction · 0.85
LuaGetIdFunction · 0.85
LuaGetTypeFunction · 0.85
LuaSetIdFunction · 0.85
LuaGetFunction · 0.85
LuaSetFunction · 0.85
LuaGetIndexFunction · 0.85
LuaDeleteNodeFunction · 0.85
LuaAnimateFunction · 0.85

Calls 5

NodeProxy_CheckFunction · 0.85
GetSceneFunction · 0.85
luaL_errorFunction · 0.85
IsValidNodeFunction · 0.85
GetNodeFunction · 0.70

Tested by

no test coverage detected