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

Function GetLayoutIndex

engine/gui/src/gui.cpp:1251–1264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1249 }
1250
1251 uint16_t GetLayoutIndex(const HScene scene, dmhash_t layout_id)
1252 {
1253 uint32_t i;
1254 for(i = 0; i < scene->m_Layouts.Size(); ++i) {
1255 if(layout_id == scene->m_Layouts[i])
1256 break;
1257 }
1258 if(i == scene->m_Layouts.Size())
1259 {
1260 dmLogError("Could not get index for layout '%s'", dmHashReverseSafe64(layout_id));
1261 return 0;
1262 }
1263 return i;
1264 }
1265
1266 Result SetNodeLayoutDesc(const HScene scene, HNode node, const void *desc, uint16_t layout_index_start, uint16_t layout_index_end)
1267 {

Callers 3

SetLayoutFunction · 0.70
TEST_FFunction · 0.50
SetupGuiSceneFunction · 0.50

Calls 2

dmHashReverseSafe64Function · 0.85
SizeMethod · 0.45

Tested by 1

TEST_FFunction · 0.40