void AnimatorBar::AnimationHasChanged() { if(m_pObjType) { OINFO* info = GetOINFO(m_pObjType->DLLIndex); vector<CObj*> objs; CObj* o; POSITION pos = application->layouts.GetHeadPosition(); while(pos) { CLayout* layout = application->layouts.GetNext(pos); POSITION pos2 = layout->objects.GetStartPosition(); for (int i = 0; i < layout->objects.GetCount(); i++) { long ID; layout->objects.GetNextAssoc(pos2, ID, o); if (o->GetGlobalID() == m_pObjType->ObjectIdentifier) objs.push_back(o); } } // Now loop each of the objects and call the end animation function. for(vector<CObj*>::iterator i = objs.begin(); i!= objs.end(); i++) { if(info->ETOnNotify) info->ETOnNotify((*i)->editObject, 2); } if(objs.size() > 0) if(info->ETOnNotify) info->ETOnNotify((*objs.begin())->editObject, 3); } }
void ObjectBarDialog::OnDblClickObject(NMHDR *pNMHDR, LRESULT *pResult) { POSITION Pos = objects.GetFirstSelectedItemPosition(); int Item = objects.GetNextSelectedItem(Pos); if (Item == -1) return; CObjType* pType; long ID = objects.GetItemData(Item); if (ID == -1) // object folder { if (folderfilter == -1) //Default folder { for(int i=0; i < application->object_folders.size(); i++) { if (objects.GetItemText(Item,0) == application->object_folders[i].name) { folderfilter=i; break; } } } else //return folder { folderfilter = -1; } Refresh(); return; } application->object_types.Lookup(ID, pType); if (!pType) return; // If layout editor open.. if (parent.m_tabs.SelectionGet() == 0 && parent.m_tabs.ItemGetCount() == 2) { POSITION ObjectPos = layout->objects.GetStartPosition(); CObj* pObject; long ID = 0; for (int i = 0; i < layout->objects.GetCount(); i++) { layout->objects.GetNextAssoc(ObjectPos, ID, pObject); CObjType* type = pObject->GetObjectType(application); if (type->ObjectIdentifier == pType->ObjectIdentifier) { OINFO* info = GetOINFO(pType->DLLIndex); if(info->ETOnNotify) info->ETOnNotify(pObject->editObject, 1); return; } } } // If event sheet editor, see if it has conditions. If so, open Event Wizard if ((parent.m_tabs.SelectionGet() == 1) && (parent.m_tabs.ItemGetCount() == 2) || parent.m_tabs.ItemGetCount() == 1) { bool bUse = false; for (int i = 0; i < pType->GetTableCount(CONDITION); i++) { ACESEntry2* pAce = pType->GetACESEntry(CONDITION, i); if(pAce == NULL || pAce->aceListName == "") continue; // Ignore null entries bUse = true; } if (bUse) { parent.m_pEventView[0][0]->m_InitialStage = 2; parent.m_pEventView[0][0]->m_InitialSelect = ID; parent.m_pEventView[0][0]->m_OldName = pType->GetName(); parent.m_pEventView[0][0]->AddCondition(true); } } }