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

Method findFirstFocusEnabledWidgetIndex

core/ui/UILayout.cpp:1144–1159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1142}
1143
1144int Layout::findFirstFocusEnabledWidgetIndex()
1145{
1146 ssize_t index = 0;
1147 ssize_t count = this->getChildren().size();
1148 while (index < count)
1149 {
1150 Widget* w = dynamic_cast<Widget*>(_children.at(index));
1151 if (w && w->isFocusEnabled())
1152 {
1153 return (int)index;
1154 }
1155 index++;
1156 }
1157 AXASSERT(0, "invalid operation");
1158 return 0;
1159}
1160
1161int Layout::findNearestChildWidgetIndex(FocusDirection direction, Widget* baseWidget)
1162{

Callers 2

Calls 3

isFocusEnabledMethod · 0.80
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected