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

Function MoveNodeBelow

engine/gui/src/gui.cpp:4390–4414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4388 }
4389
4390 void MoveNodeBelow(HScene scene, HNode node, HNode reference)
4391 {
4392 if (node != INVALID_HANDLE && node != reference)
4393 {
4394 InternalNode* n = GetNode(scene, node);
4395 RemoveFromNodeList(scene, n);
4396 InternalNode* parent = 0x0;
4397 InternalNode* prev = 0x0;
4398 if (reference != INVALID_HANDLE)
4399 {
4400 uint16_t ref_index = reference & 0xffff;
4401 InternalNode* ref = &scene->m_Nodes[ref_index];
4402 // The reference is actually the next node, find the previous
4403 if (ref->m_PrevIndex != INVALID_INDEX)
4404 {
4405 prev = &scene->m_Nodes[ref->m_PrevIndex];
4406 }
4407 if (ref->m_ParentIndex != INVALID_INDEX)
4408 {
4409 parent = &scene->m_Nodes[ref->m_ParentIndex];
4410 }
4411 }
4412 AddToNodeList(scene, n, parent, prev);
4413 }
4414 }
4415
4416 void MoveNodeAbove(HScene scene, HNode node, HNode reference)
4417 {

Callers 2

LuaMoveBelowFunction · 0.70
TEST_FFunction · 0.50

Calls 3

RemoveFromNodeListFunction · 0.85
AddToNodeListFunction · 0.85
GetNodeFunction · 0.70

Tested by 1

TEST_FFunction · 0.40