本文整理汇总了C++中OverlayElement::getZOrder方法的典型用法代码示例。如果您正苦于以下问题:C++ OverlayElement::getZOrder方法的具体用法?C++ OverlayElement::getZOrder怎么用?C++ OverlayElement::getZOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OverlayElement
的用法示例。
在下文中一共展示了OverlayElement::getZOrder方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findElementAt
OverlayElement* OverlayContainer::findElementAt(Real x, Real y) // relative to parent
{
OverlayElement* ret = NULL;
int currZ = -1;
if (mVisible)
{
ret = OverlayElement::findElementAt(x,y); //default to the current container if no others are found
if (ret && mChildrenProcessEvents)
{
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
OverlayElement* currentOverlayElement = it.getNext();
if (currentOverlayElement->isVisible() && currentOverlayElement->isEnabled())
{
int z = currentOverlayElement->getZOrder();
if (z > currZ)
{
OverlayElement* elementFound = currentOverlayElement->findElementAt(x ,y );
if (elementFound)
{
currZ = z;
ret = elementFound;
}
}
}
}
}
}
return ret;
}
示例2: findElementAt
//---------------------------------------------------------------------
OverlayElement* Overlay::findElementAt(Real x, Real y)
{
OverlayElement* ret = NULL;
int currZ = -1;
OverlayContainerList::iterator i, iend;
iend = m2DElements.end();
for (i = m2DElements.begin(); i != iend; ++i)
{
int z = (*i)->getZOrder();
if (z > currZ)
{
OverlayElement* elementFound = (*i)->findElementAt(x,y);
if(elementFound)
{
currZ = elementFound->getZOrder();
ret = elementFound;
}
}
}
return ret;
}