Exemple #1
0
	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();
}
Exemple #3
0
	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();
	}
Exemple #4
0
	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();
	}