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

Function GetNodeParent

engine/gui/src/gui.cpp:4446–4455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4444 }
4445
4446 HNode GetNodeParent(HScene scene, HNode node)
4447 {
4448 InternalNode* n = GetNode(scene, node);
4449 if (n->m_ParentIndex == INVALID_INDEX)
4450 {
4451 return dmGui::INVALID_HANDLE;
4452 }
4453 InternalNode* parent_n = &scene->m_Nodes[n->m_ParentIndex];
4454 return GetNodeHandle(parent_n);
4455 }
4456
4457 static Vector3 ScreenToLocalPosition(HScene scene, InternalNode* node, InternalNode* parent_node, dmVMath::Vector3 screen_position)
4458 {

Callers 1

LuaGetParentFunction · 0.85

Calls 2

GetNodeFunction · 0.70
GetNodeHandleFunction · 0.70

Tested by

no test coverage detected