Esempio n. 1
0
void WorkspacePanel::materialNameChanged(EventArgs& args)
{
	MaterialEventArgs mea = dynamic_cast<MaterialEventArgs&>(args);
	MaterialController* mc = mea.getMaterialController();

	wxTreeItemId materialId = mMaterialIdMap[mc];
	mTreeCtrl->SetItemText(materialId, mc->getMaterial()->getName().c_str());
}
Esempio n. 2
0
void WorkspacePanel::materialTechniqueAdded(EventArgs& args)
{
	MaterialEventArgs mea = dynamic_cast<MaterialEventArgs&>(args);
	MaterialController* mc = mea.getMaterialController();
	TechniqueController* tc = mea.getTechniqueController();

	wxTreeItemId materialId = mMaterialIdMap[mc];
	wxTreeItemId id = mTreeCtrl->AppendItem(materialId, tc->getTechnique()->getName().c_str(), TECHNIQUE_IMAGE);
	mTreeCtrl->SelectItem(id, true);
	
	mTechniqueIdMap[tc] = id;

	subscribe(tc);
}
Esempio n. 3
0
void PropertiesPanel::techniqueRemoved(EventArgs& args)
{
	// Consider: Should this method also attempt to remove all
	//           of the page associated with this Techniques, Passes?

	MaterialEventArgs mea = dynamic_cast<MaterialEventArgs&>(args);
	TechniqueController* tc = mea.getTechniqueController();

	TechniquePageIndexMap::iterator it = mTechniquePageIndexMap.find(tc);
	if(it != mTechniquePageIndexMap.end())
	{
		mPropertyGrid->RemovePage(mTechniquePageIndexMap[tc]);
		mTechniquePageIndexMap.erase(it);
	}
}