Exemplo n.º 1
0
 bool CocoWidget::getAbsoluteVisible()
 {
     if (this->m_bVisibleDirty) {
         CocoWidget* parent = this;
         bool visible = this->getVisible();
         while (parent){
             visible &= parent->getVisible();
             if (!visible) {
                 break;
             }
             parent = parent->getWidgetParent();
         }
         this->m_bAbsoluteVisible = visible;
         this->m_bVisibleDirty = false;
     }
     return this->m_bAbsoluteVisible;
 }
Exemplo n.º 2
0
    void UIInputManager::update(float dt)
    {
        if (this->m_bTouchDown){
            this->m_fLongClickRecordTime += dt;
            if (this->m_fLongClickRecordTime >= this->m_fLongClickTime){
                this->m_fLongClickRecordTime = 0;
                this->m_bTouchDown = false;
                this->m_pCurSelectedWidget->onTouchLongClicked(this->touchBeganedPoint);
            }
        }
        for (int i=0;i<this->checkedDoubleClickWidget->count();i++){
            CocoWidget* widget = (CocoWidget*)(this->checkedDoubleClickWidget->objectAtIndex(i));
            if (!widget->getVisible()){
                continue;
            }
//            widget->checkDoubleClick(dt);
        }
    }