Exemple #1
0
void WorkspacePanel::techniqueNameChanged(EventArgs& args)
{
	TechniqueEventArgs tea = dynamic_cast<TechniqueEventArgs&>(args);
	TechniqueController* tc = tea.getTechniqueController();

	wxTreeItemId techniqueId = mTechniqueIdMap[tc];
	mTreeCtrl->SetItemText(techniqueId, tc->getTechnique()->getName().c_str());
}
void TechniquePropertyGridPage::lodIndexChanged(EventArgs& args)
{
	TechniqueEventArgs tea = dynamic_cast<TechniqueEventArgs&>(args);
	TechniqueController* tc = tea.getTechniqueController();

	wxPGProperty* prop = GetPropertyPtr(mLodIndexId);
	if(prop == NULL) return;
	prop->SetValueFromInt(tc->getTechnique()->getLodIndex());
}
void TechniquePropertyGridPage::schemeNameChanged(EventArgs& args)
{
	TechniqueEventArgs tea = dynamic_cast<TechniqueEventArgs&>(args);
	TechniqueController* tc = tea.getTechniqueController();

	wxPGProperty* prop = GetPropertyPtr(mSchemeNameId);
	if(prop == NULL) return;
	prop->SetValueFromString(tc->getTechnique()->getSchemeName().c_str());
}
Exemple #4
0
void PropertiesPanel::passRemoved(EventArgs& args)
{
	TechniqueEventArgs tea = dynamic_cast<TechniqueEventArgs&>(args);
	PassController* pc = tea.getPassController();

	PassPageIndexMap::iterator it = mPassPageIndexMap.find(pc);
	if(it != mPassPageIndexMap.end())
	{
		mPropertyGrid->RemovePage(mPassPageIndexMap[pc]);
		mPassPageIndexMap.erase(it);
	}
}
Exemple #5
0
void WorkspacePanel::techniquePassAdded(EventArgs& args)
{
	TechniqueEventArgs tea = dynamic_cast<TechniqueEventArgs&>(args);
	TechniqueController* tc = tea.getTechniqueController();
	PassController* pc = tea.getPassController();

	wxTreeItemId techniqueId = mTechniqueIdMap[tc];
	wxTreeItemId id = mTreeCtrl->AppendItem(techniqueId, pc->getPass()->getName().c_str(), PASS_IMAGE);
	mTreeCtrl->SelectItem(id, true);

	mPassIdMap[pc] = id;
}