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

Function NodeProxy_eq

engine/gui/src/gui_script.cpp:434–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432 }
433
434 static int NodeProxy_eq(lua_State *L)
435 {
436 NodeProxy* np1 = (NodeProxy*)dmScript::ToUserType(L, 1, NODE_PROXY_TYPE_HASH);
437 NodeProxy* np2 = (NodeProxy*)dmScript::ToUserType(L, 2, NODE_PROXY_TYPE_HASH);
438 if (np1 == 0 || np2 == 0)
439 {
440 lua_pushboolean(L, 0);
441 return 1;
442 }
443
444 if (np1->m_Scene != np2->m_Scene)
445 {
446 lua_pushboolean(L, 0);
447 return 1;
448 }
449
450 HNode hn1, hn2;
451 InternalNode* n1 = LuaCheckNodeInternal(L, 1, &hn1);
452 InternalNode* n2 = LuaCheckNodeInternal(L, 2, &hn2);
453 (void) n1;
454 (void) n2;
455
456 lua_pushboolean(L, (int) (hn1 == hn2));
457 return 1;
458 }
459
460 static const luaL_reg NodeProxy_methods[] =
461 {

Callers

nothing calls this directly

Calls 3

ToUserTypeFunction · 0.85
lua_pushbooleanFunction · 0.85
LuaCheckNodeInternalFunction · 0.85

Tested by

no test coverage detected