MCPcopy Create free account
hub / github.com/axmolengine/axmol / findFirstNonLayoutWidget

Method findFirstNonLayoutWidget

core/ui/UILayout.cpp:1272–1298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1270}
1271
1272Widget* Layout::findFirstNonLayoutWidget()
1273{
1274 Widget* widget = nullptr;
1275 for (Node* node : _children)
1276 {
1277 Layout* layout = dynamic_cast<Layout*>(node);
1278 if (layout)
1279 {
1280 widget = layout->findFirstNonLayoutWidget();
1281 if (widget != nullptr)
1282 {
1283 return widget;
1284 }
1285 }
1286 else
1287 {
1288 Widget* w = dynamic_cast<Widget*>(node);
1289 if (w)
1290 {
1291 widget = w;
1292 break;
1293 }
1294 }
1295 }
1296
1297 return widget;
1298}
1299
1300void Layout::findProperSearchingFunctor(FocusDirection dir, Widget* baseWidget)
1301{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected