Example #1
0
/**
* Called by the ToggleListView when the toggle state has changed.
*/
void StageView::OnStateChanged(int index, int toggleState) {
	MaterialDoc* material = materialDocManager->GetCurrentMaterialDoc();
	if(material && index > 0) {
		if (toggleState == ToggleListView::TOGGLE_STATE_ON) {
			material->EnableStage(index-1, true);
		} else if (toggleState == ToggleListView::TOGGLE_STATE_OFF) {
			material->EnableStage(index-1, false);
		}
	}
}