MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / findLastTabable

Method findLastTabable

Engine/source/gui/core/guiControl.cpp:2079–2103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2077//-----------------------------------------------------------------------------
2078
2079GuiControl* GuiControl::findLastTabable(bool firstCall)
2080{
2081 // No tabbing if the control is disabled or hidden.
2082 if ( !mAwake || !mVisible )
2083 return NULL;
2084
2085 //if this is the first call, clear the global
2086 if (firstCall)
2087 smPrevResponder = NULL;
2088
2089 //if this control is tabable, set the global
2090 if (mProfile->mTabable)
2091 smPrevResponder = this;
2092
2093 iterator i;
2094 for (i = begin(); i != end(); i++)
2095 {
2096 GuiControl *ctrl = static_cast<GuiControl *>(*i);
2097 ctrl->findLastTabable(false);
2098 }
2099
2100 //after the entire tree has been traversed, return the last responder found
2101 mFirstResponder = smPrevResponder;
2102 return smPrevResponder;
2103}
2104
2105//-----------------------------------------------------------------------------
2106

Callers 1

tabPrevMethod · 0.80

Calls 2

beginFunction · 0.85
endFunction · 0.85

Tested by

no test coverage detected