bool ArrayEditor<ElementType>::OnEventButtonAddPressed(const CEGUI::EventArgs&) { LockUpdates(); mArray.push_back(new ElementType(PropertyTypes::GetDefaultValue<ElementType>())); UpdateEditors(); return true; }
void UEnvironmentQueryGraph::Initialize() { Super::Initialize(); LockUpdates(); SpawnMissingNodes(); CalculateAllWeights(); UnlockUpdates(); }
void ArrayEditor<ElementType>::RemoveElement(uint32 index) { OC_DASSERT(index < mArray.size()); LockUpdates(); SubmitEditors(); /// Remove given element from internal array. delete mArray[index]; mArray.erase(mArray.begin() + index); UpdateEditors(); }
void ArrayEditor<ElementType>::Update() { /// If one of element editors is locked, consider the whole editor as locked. for (typename vector<AbstractValueEditor*>::iterator it = mElementEditors.begin(); it != mElementEditors.end(); ++it) { if ((*it)->UpdatesLocked()) LockUpdates(); } if (UpdatesLocked()) return; UpdateInternalArray(); UpdateEditors(); }