本文整理汇总了C++中CocoWidget::didNotSelectSelf方法的典型用法代码示例。如果您正苦于以下问题:C++ CocoWidget::didNotSelectSelf方法的具体用法?C++ CocoWidget::didNotSelectSelf怎么用?C++ CocoWidget::didNotSelectSelf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CocoWidget
的用法示例。
在下文中一共展示了CocoWidget::didNotSelectSelf方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkEventWidget
CocoWidget* UIInputManager::checkEventWidget(cocos2d::CCPoint &touchPoint)
{
if (!this->m_bWidgetBeSorted){
this->sortWidgets();
}
// for (int i=0;i<this->m_manageredWidget->count();i++) {
// CocoWidget* widget = (CocoWidget*)(this->m_manageredWidget->objectAtIndex(i));
// printf("widget name == [%s] z == [%d]\n",widget->getName().c_str(),widget->getWidgetZOrder());
// }
for (int i=0;i<this->m_manageredWidget->count();i++){
CocoWidget* widget = (CocoWidget*)(this->m_manageredWidget->objectAtIndex(i));
if(widget->pointAtSelfBody(touchPoint)){
if (!widget->checkVisibleDependParent(touchPoint)){
continue;
}
if (i != this->m_manageredWidget->count()-1){
int j = i+1;
for (;j < this->m_manageredWidget->count();j++){
CocoWidget* widget = (CocoWidget*)(m_manageredWidget->objectAtIndex(j));
widget->didNotSelectSelf();
}
}
return widget;
}else{
widget->didNotSelectSelf();
}
}
return NULL;
}
示例2: checkEventWidget
CocoWidget* UIInputManager::checkEventWidget(cocos2d::CCPoint &touchPoint)
{
if (!m_bWidgetBeSorted && m_pRootWidget)
{
this->sortWidgets(m_pRootWidget);
}
int widgetCount = this->m_manageredWidget->count();
for (int i=0;i<widgetCount;i++)
{
CocoWidget* widget = (CocoWidget*)(this->m_manageredWidget->objectAtIndex(i));
if(widget->pointAtSelfBody(touchPoint))
{
if (!widget->checkVisibleDependParent(touchPoint))
{
continue;
}
if (i != this->m_manageredWidget->count()-1){
int j = i+1;
for (;j < this->m_manageredWidget->count();j++)
{
CocoWidget* wid = (CocoWidget*)(m_manageredWidget->objectAtIndex(j));
wid->didNotSelectSelf();
}
}
return widget;
}
else
{
widget->didNotSelectSelf();
}
}
return NULL;
}