mirror of https://github.com/axmolengine/axmol.git
commit
d721f4d3c0
|
@ -325,6 +325,22 @@ public:
|
|||
return m_array.rbegin();
|
||||
}
|
||||
|
||||
CCMutableArrayIterator getLastValidIterator(void)
|
||||
{
|
||||
CCMutableArrayIterator iter;
|
||||
CCMutableArrayIterator ret;
|
||||
for (iter = m_array.begin(); iter != m_array.end(); ++iter)
|
||||
{
|
||||
ret = iter;
|
||||
if (! (*iter))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* end is a keyword of lua, so should use other name
|
||||
* to export to lua
|
||||
|
|
|
@ -264,7 +264,7 @@ CCTouchHandler* CCTouchDispatcher::findHandler(CCTouchDelegate *pDelegate)
|
|||
|
||||
void CCTouchDispatcher::rearrangeHandlers(CCMutableArray<CCTouchHandler*> *pArray)
|
||||
{
|
||||
std::sort(pArray->begin(), pArray->end(), less);
|
||||
std::sort(pArray->begin(), pArray->getLastValidIterator(), less);
|
||||
}
|
||||
|
||||
void CCTouchDispatcher::setPriority(int nPriority, CCTouchDelegate *pDelegate)
|
||||
|
|
Loading…
Reference in New Issue