AoMModelEditor.BrgUi.LoadMeshUI C# (CSharp) Method

LoadMeshUI() public method

public LoadMeshUI ( ) : void
return void
        public void LoadMeshUI()
        {
            this.Plugin.brgObjectListView.Columns.Clear();
            OLVColumn flagsCol = new OLVColumn("Flags", "Header.Flags");
            flagsCol.Width = 200;
            flagsCol.AspectPutter = delegate(object rowObject, object newValue)
            {
                this.File.UpdateMeshSettings((BrgMeshFlag)newValue, this.File.Meshes[0].Header.Format,
                    this.File.Meshes[0].Header.AnimationType, this.File.Meshes[0].Header.InterpolationType);
            };
            this.Plugin.brgObjectListView.Columns.Add(flagsCol);

            OLVColumn formatCol = new OLVColumn("Format", "Header.Format");
            formatCol.Width = 200;
            formatCol.AspectPutter = delegate(object rowObject, object newValue)
            {
                this.File.UpdateMeshSettings(this.File.Meshes[0].Header.Flags, (BrgMeshFormat)newValue,
                    this.File.Meshes[0].Header.AnimationType, this.File.Meshes[0].Header.InterpolationType);
            };
            this.Plugin.brgObjectListView.Columns.Add(formatCol);

            OLVColumn animTypeCol = new OLVColumn("Animation Type", "Header.AnimationType");
            animTypeCol.Width = 100;
            animTypeCol.AspectPutter = delegate(object rowObject, object newValue)
            {
                this.File.UpdateMeshSettings(this.File.Meshes[0].Header.Flags, this.File.Meshes[0].Header.Format,
                    (BrgMeshAnimType)newValue, this.File.Meshes[0].Header.InterpolationType);
            };
            this.Plugin.brgObjectListView.Columns.Add(animTypeCol);

            OLVColumn interpTypeCol = new OLVColumn("Interpolation Type", "Header.InterpolationType");
            interpTypeCol.Width = 100;
            interpTypeCol.AspectPutter = delegate(object rowObject, object newValue)
            {
                this.File.UpdateMeshSettings(this.File.Meshes[0].Header.Flags, this.File.Meshes[0].Header.Format,
                    this.File.Meshes[0].Header.AnimationType, (BrgMeshInterpolationType)newValue);
            };
            this.Plugin.brgObjectListView.Columns.Add(interpTypeCol);
        }

Usage Example

示例#1
0
        private void brgObjectsTreeListView_SelectionChanged(object sender, EventArgs e)
        {
            if (this.brgObjectsTreeListView.SelectedObject == null)
            {
                return;
            }

            if (this.brgObjectsTreeListView.SelectedObject is BrgAttachpoint)
            {
                brg.LoadAttachpointUI();
            }
            else if (this.brgObjectsTreeListView.SelectedObject is BrgMesh)
            {
                brg.LoadMeshUI();
            }
            else if (this.brgObjectsTreeListView.SelectedObject is BrgMaterial)
            {
                brg.LoadMaterialUI();
            }

            this.brgObjectListView.SetObjects(new object[] { this.brgObjectsTreeListView.SelectedObject });
        }