public void LoadMaterialUI()
{
this.Plugin.brgObjectListView.Columns.Clear();
OLVColumn idCol = new OLVColumn("ID", "Id");
idCol.Width = 35;
idCol.IsEditable = false;
this.Plugin.brgObjectListView.Columns.Add(idCol);
OLVColumn flagsCol = new OLVColumn("Flags", "Flags");
flagsCol.Width = 200;
this.Plugin.brgObjectListView.Columns.Add(flagsCol);
OLVColumn diffColorCol = new OLVColumn("Diffuse Color", "DiffuseColor");
this.Plugin.brgObjectListView.Columns.Add(diffColorCol);
OLVColumn ambColorCol = new OLVColumn("Ambient Color", "AmbientColor");
this.Plugin.brgObjectListView.Columns.Add(ambColorCol);
OLVColumn specColorCol = new OLVColumn("Specular Color", "SpecularColor");
this.Plugin.brgObjectListView.Columns.Add(specColorCol);
OLVColumn emisColorCol = new OLVColumn("Emissive Color", "EmissiveColor");
this.Plugin.brgObjectListView.Columns.Add(emisColorCol);
OLVColumn specLevelCol = new OLVColumn("Specular Level", "SpecularExponent");
this.Plugin.brgObjectListView.Columns.Add(specLevelCol);
OLVColumn opacityCol = new OLVColumn("Opacity", "Opacity");
this.Plugin.brgObjectListView.Columns.Add(opacityCol);
OLVColumn diffMapCol = new OLVColumn("Diffuse Map", "DiffuseMap");
this.Plugin.brgObjectListView.Columns.Add(diffMapCol);
OLVColumn bumpMapCol = new OLVColumn("Bump Map", "BumpMap");
this.Plugin.brgObjectListView.Columns.Add(bumpMapCol);
OLVColumn reflMapCol = new OLVColumn("Reflection Map", string.Empty);
reflMapCol.AspectGetter = delegate(object rowObject)
{
BrgMaterial mat = (BrgMaterial)rowObject;
if (mat.sfx.Count > 0)
{
return mat.sfx[0].Name;
}
else { return string.Empty; }
};
reflMapCol.AspectPutter = delegate(object rowObject, object newValue)
{
BrgMaterial mat = (BrgMaterial)rowObject;
BrgMatSFX sfxMap = new BrgMatSFX();
sfxMap.Id = 30;
sfxMap.Name = (string)newValue;
if (mat.sfx.Count > 0) { mat.sfx[0] = sfxMap; }
else { mat.sfx.Add(sfxMap); }
};
this.Plugin.brgObjectListView.Columns.Add(reflMapCol);
}