void VScrollBarOverlayWindow::MouseUp() { RemoveState(ThumbState::MOUSE_DOWN); current_action_ = ThumbAction::NONE; UpdateTexture(); ShouldHide(); }
void AlbumCoverManager::UpdateFilter() { const QString filter = ui_->filter->text().toLower(); const bool hide_with_covers = filter_without_covers_->isChecked(); const bool hide_without_covers = filter_with_covers_->isChecked(); HideCovers hide = Hide_None; if (hide_with_covers) { hide = Hide_WithCovers; } else if (hide_without_covers) { hide = Hide_WithoutCovers; } qint32 total_count = 0; qint32 without_cover = 0; for (int i = 0; i < ui_->albums->count(); ++i) { QListWidgetItem* item = ui_->albums->item(i); bool should_hide = ShouldHide(*item, filter, hide); item->setHidden(should_hide); if (!should_hide) { total_count++; if (item->icon().cacheKey() == no_cover_icon_.cacheKey()) { without_cover++; } } } ui_->total_albums->setText(QString::number(total_count)); ui_->without_cover->setText(QString::number(without_cover)); }
void AlbumCoverManager::UpdateFilter() { const QString filter = filter_->text().toLower(); const bool hide_with_covers = filter_without_covers_->isChecked(); const bool hide_without_covers = filter_with_covers_->isChecked(); HideCovers hide = Hide_None; if (hide_with_covers) { hide = Hide_WithCovers; } else if (hide_without_covers) { hide = Hide_WithoutCovers; } for (int i = 0; i < ui_->albums->count(); ++i) { QListWidgetItem* item = ui_->albums->item(i); item->setHidden(ShouldHide(*item, filter, hide)); } }
void CBoundingContainer::HideContainedItems() { IEntity* pEntity = GetEntity(); if (pEntity) { // Proximity query all entities in area AABB aabbBounds(m_vBoundingMin, m_vBoundingMax); OBB obbBounds; Matrix34 worldTM = pEntity->GetWorldTM(); obbBounds.SetOBBfromAABB(Matrix33(worldTM), aabbBounds); aabbBounds.Reset(); aabbBounds.SetAABBfromOBB(pEntity->GetWorldPos(), obbBounds); SEntityProximityQuery query; query.box = aabbBounds; gEnv->pEntitySystem->QueryProximity(query); const int iQueryCount = query.nCount; for (int i = 0; i < iQueryCount; ++i) { IEntity* pQueryEntity = query.pEntities[i]; if (pQueryEntity) { const EntityId queryEntityId = pQueryEntity->GetId(); if (!stl::find(m_hiddenEntities, queryEntityId)) // Only if not already hidden { // Make sure entity type should be hidden and entity pos is also inside, not just an intersection if (ShouldHide(queryEntityId, pQueryEntity) && aabbBounds.IsContainPoint(pQueryEntity->GetWorldPos())) { pQueryEntity->Hide(true); m_hiddenEntities.push_back(pQueryEntity->GetId()); } } } } } }
void VScrollBarOverlayWindow::ResetStates() { current_state_ = ThumbState::NONE; current_action_ = ThumbAction::NONE; ShouldHide(); }
void VScrollBarOverlayWindow::MouseLeave() { RemoveState(ThumbState::MOUSE_INSIDE); ShouldHide(); }
void VScrollBarOverlayWindow::MouseBeyond() { RemoveState(ThumbState::MOUSE_NEAR); ShouldHide(); }