コード例 #1
0
ファイル: WorkspacePanel.cpp プロジェクト: brunobg/TuxSinbad
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);
}
コード例 #2
0
ファイル: PropertiesPanel.cpp プロジェクト: Anti-Mage/ogre
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);
	}
}