void UGameplayCueNotify_Static::HandleGameplayCue(AActor* MyTarget, EGameplayCueEvent::Type EventType, FGameplayCueParameters Parameters) { if (MyTarget && !MyTarget->IsPendingKill()) { K2_HandleGameplayCue(MyTarget, EventType, Parameters); switch (EventType) { case EGameplayCueEvent::OnActive: OnActive(MyTarget, Parameters); break; case EGameplayCueEvent::WhileActive: WhileActive(MyTarget, Parameters); break; case EGameplayCueEvent::Executed: OnExecute(MyTarget, Parameters); break; case EGameplayCueEvent::Removed: OnRemove(MyTarget, Parameters); break; }; } else { ABILITY_LOG(Warning, TEXT("Null Target")); } }
//******************************************************************************* void CBCGPDiagramVisualContainer::RemoveAllConnectors (BOOL bRebuildContainer) { for (int i = 0; i < m_arObjects.GetSize(); i++) { CBCGPDiagramConnector* pObject = DYNAMIC_DOWNCAST(CBCGPDiagramConnector, m_arObjects[i]); if (pObject == NULL) { continue; } OnRemove (pObject); if (pObject->IsAutoDestroy ()) { delete pObject; } else { pObject->SetParentContainer (NULL); } m_arObjects[i] = NULL; } m_mapConnectors.RemoveAll (); if (bRebuildContainer) { RebuildContainer (); } AdjustLayout(); }
//******************************************************************************* BOOL CBCGPDiagramVisualContainer::Remove (CBCGPDiagramItemID id, BOOL bRebuildContainer) { CBCGPBaseVisualObject* pObject = GetItem (id); if (pObject == NULL) { return FALSE; } ASSERT_VALID(pObject); int nIndex = FindIndex (pObject); if (nIndex >= 0 && nIndex < (int) m_arObjects.GetSize ()) { m_arObjects[nIndex] = NULL; } OnRemove (pObject); if (pObject->IsAutoDestroy ()) { delete pObject; } if (bRebuildContainer) { RebuildContainer (); } AdjustLayout(); return TRUE; }
EntityComponent::~EntityComponent() { if (!m_parent) { OnRemove(); } }
void AccelEditor::OnReplace() { if (CheckAffected()) return; OnRemove(); OnAssign(); }
Void GUIListModel::Pop() { // Raise callback OnRemove( m_arrNodes.Count() - 1 ); // Pop m_arrNodes.Pop( NULL, 1 ); }
Void GUIListModel::Remove( UInt iNode ) { // Raise callback OnRemove( iNode ); // Remove m_arrNodes.Remove( iNode, NULL, 1 ); }
void MyFrame::OnRecreate( wxCommandEvent& event ) { OnRemove( event ); // first destroy active layout CreateLayout( mActiveLayoutNo ); mLayouts[mActiveLayoutNo]->Activate(); }
Void GUIListModel::Shift() { // Raise callback OnRemove( 0 ); // Shift m_arrNodes.Shift( NULL, 1 ); }
void CFilterConditionsDialog::OnRemove(int item) { std::set<int> selected; selected.insert(item); OnRemove(selected); if (m_filterControls.empty()) OnMore(); }
void CBaseEntityList::FinishRemoveEntity( CBaseEntity* pEntity ) { OnRemove( pEntity ); const EHandle handle = pEntity->GetEntHandle(); GetEntityDict().DestroyEntity( pEntity ); m_Entities[ handle.GetEntIndex() ].pEntity = nullptr; }
Void GUIListModel::Replace( UInt iNode, const GChar * strName, GUISkinImage idIcon ) { // Raise callback OnRemove( iNode ); // Replace StringFn->NCopy( m_arrNodes[iNode].m_strName, strName, GUI_NAME_LENGTH - 1 ); m_arrNodes[iNode].m_idIcon = idIcon; // Raise callback OnInsert( iNode ); }
void AGameplayCueNotify_Actor::GameplayCueFinishedCallback() { if (FinishTimerHandle.IsValid()) { GetWorld()->GetTimerManager().ClearTimer(FinishTimerHandle); FinishTimerHandle.Invalidate(); } // Make sure OnRemoved has been called at least once if WhileActive was called (for possible cleanup) if (bHasHandledWhileActiveEvent && !bHasHandledOnRemoveEvent) { // Force onremove to be called with null parameters bHasHandledOnRemoveEvent = true; OnRemove(nullptr, FGameplayCueParameters()); } UAbilitySystemGlobals::Get().GetGameplayCueManager()->NotifyGameplayCueActorFinished(this); }
void CFilterConditionsDialog::OnButton(wxCommandEvent& event) { if (event.GetId() == m_pAdd->GetId()) { OnMore(); return; } for (int i = 0; i < (int)m_filterControls.size(); i++) { if (m_filterControls[i].pRemove->GetId() == event.GetId()) { OnRemove(i); return; } } event.Skip(); }
CPropertiesView::CPropertiesView(bool bWithButtons, QWidget *parent) :QWidget(parent) { m_ReadOnly = false; m_pMainLayout = new QVBoxLayout(); m_pPropertiesTree = new QTreeWidget(); m_pPropertiesTree->setHeaderLabels(tr("Key|Value|Type").split("|")); //m_pPropertiesTree->setSelectionMode(QAbstractItemView::ExtendedSelection); #ifdef WIN32 m_pPropertiesTree->setStyle(QStyleFactory::create("windowsxp")); #endif m_pPropertiesTree->setSortingEnabled(true); m_pPropertiesTree->setContextMenuPolicy(Qt::CustomContextMenu); connect(m_pPropertiesTree, SIGNAL(customContextMenuRequested( const QPoint& )), this, SLOT(OnMenuRequested(const QPoint &))); m_pMenu = new QMenu(); m_pAddRoot = new QAction(tr("Add to Root"), m_pMenu); connect(m_pAddRoot, SIGNAL(triggered()), this, SLOT(OnAddRoot())); m_pMenu->addAction(m_pAddRoot); m_pAdd = new QAction(tr("Add"), m_pMenu); connect(m_pAdd, SIGNAL(triggered()), this, SLOT(OnAdd())); m_pMenu->addAction(m_pAdd); m_pRemove = new QAction(tr("Remove"), m_pMenu); connect(m_pRemove, SIGNAL(triggered()), this, SLOT(OnRemove())); m_pMenu->addAction(m_pRemove); m_pMainLayout->addWidget(m_pPropertiesTree); if(bWithButtons) { m_pButtons = new QDialogButtonBox(QDialogButtonBox::Apply | QDialogButtonBox::Reset, Qt::Horizontal, this); QObject::connect(m_pButtons, SIGNAL(clicked(QAbstractButton *)), this, SLOT(OnClicked(QAbstractButton*))); m_pMainLayout->addWidget(m_pButtons); } else
void AGameplayCueNotify_Actor::HandleGameplayCue(AActor* MyTarget, EGameplayCueEvent::Type EventType, const FGameplayCueParameters& Parameters) { SCOPE_CYCLE_COUNTER(STAT_HandleGameplayCueNotifyActor); if (Parameters.MatchedTagName.IsValid() == false) { ABILITY_LOG(Warning, TEXT("GameplayCue parameter is none for %s"), *GetNameSafe(this)); } // Handle multiple event gating { if (EventType == EGameplayCueEvent::OnActive && !bAllowMultipleOnActiveEvents && bHasHandledOnActiveEvent) { return; } if (EventType == EGameplayCueEvent::WhileActive && !bAllowMultipleWhileActiveEvents && bHasHandledWhileActiveEvent) { return; } if (EventType == EGameplayCueEvent::Removed && bHasHandledOnRemoveEvent) { return; } } // If cvar is enabled, check that the target no longer has the matched tag before doing remove logic. This is a simple way of supporting stacking, such that if an actor has two sources giving him the same GC tag, it will not be removed when the first one is removed. if (GameplayCueNotifyTagCheckOnRemove > 0 && EventType == EGameplayCueEvent::Removed) { if (IGameplayTagAssetInterface* TagInterface = Cast<IGameplayTagAssetInterface>(MyTarget)) { if (TagInterface->HasMatchingGameplayTag(Parameters.MatchedTagName)) { return; } } } if (MyTarget && !MyTarget->IsPendingKill()) { K2_HandleGameplayCue(MyTarget, EventType, Parameters); // Clear any pending auto-destroy that may have occurred from a previous OnRemove SetLifeSpan(0.f); switch (EventType) { case EGameplayCueEvent::OnActive: OnActive(MyTarget, Parameters); bHasHandledOnActiveEvent = true; break; case EGameplayCueEvent::WhileActive: WhileActive(MyTarget, Parameters); bHasHandledWhileActiveEvent = true; break; case EGameplayCueEvent::Executed: OnExecute(MyTarget, Parameters); break; case EGameplayCueEvent::Removed: bHasHandledOnRemoveEvent = true; OnRemove(MyTarget, Parameters); if (bAutoDestroyOnRemove) { if (AutoDestroyDelay > 0.f) { FTimerDelegate Delegate = FTimerDelegate::CreateUObject(this, &AGameplayCueNotify_Actor::GameplayCueFinishedCallback); GetWorld()->GetTimerManager().SetTimer(FinishTimerHandle, Delegate, AutoDestroyDelay, false); } else { GameplayCueFinishedCallback(); } } break; }; } else { ABILITY_LOG(Warning, TEXT("Null Target called for event %d on GameplayCueNotifyActor %s"), (int32)EventType, *GetName() ); if (EventType == EGameplayCueEvent::Removed) { // Make sure the removed event is handled so that we don't leak GC notify actors GameplayCueFinishedCallback(); } } }
void ResourceImpl::Destroy() { m_state = ResourceState::Uninitialized; OnRemove(); }
BOOL AccelEditor::PreTranslateMessage(MSG *pMsg) { CWnd *pFocus = GetFocus(); if (pFocus == &m_currents) { if (pMsg->message == WM_KEYDOWN) { switch (pMsg->wParam) { case VK_ESCAPE: m_currents.SetItemState(-1, 0, LVIS_SELECTED); CheckListSelections(); break; case VK_RETURN: case VK_INSERT: // kludge to workaround CKeyboardEdit::PreTranslateMessage() break; case VK_DELETE: case VK_BACK: OnRemove(); break; case VK_F6: case VK_LEFT: m_commands.SetFocus(); break; case VK_RIGHT: GetDlgItem(ID_OK)->SetFocus(); default: return ResizeDlg::PreTranslateMessage(pMsg); } return TRUE; } else if (pMsg->message == WM_KEYUP) // kludge to workaround CKeyboardEdit::PreTranslateMessage() { switch (pMsg->wParam) { case VK_RETURN: OnEdit(); break; case VK_INSERT: OnNew(); break; default: return ResizeDlg::PreTranslateMessage(pMsg); } return TRUE; } } else if (pFocus == &m_commands) { if (pMsg->message == WM_KEYDOWN) { switch (pMsg->wParam) { case VK_F6: m_currents.SetFocus(); break; case VK_RIGHT: if (!m_commands.ItemHasChildren(m_commands.GetSelectedItem())) { m_currents.SetFocus(); break; } // fall through default: return ResizeDlg::PreTranslateMessage(pMsg); } return TRUE; } } return ResizeDlg::PreTranslateMessage(pMsg); }