예제 #1
0
        public void Init(Game_Interface Interface, Actor CurrentActor, DockPanel Dock, List <ToolForm> OpenForms)
        {
            InitializeComponent();
            this._Interface    = Interface;
            this._CurrentActor = CurrentActor;
            this._Dock         = Dock;
            this._OpenForms    = OpenForms;
            PropertiesHolder Geometries = new PropertiesHolder();

            Geometries.SetTitleColor(Color.FromArgb(80, 80, 80));
            Geometries.Title   = "Geometries";
            Geometries.Toggled = false;
            for (int i = 0; i < CurrentActor.Geometries.Count; i++)
            {
                Properties_Geometry NewGeometry = new Properties_Geometry(Interface, CurrentActor, i);
                Geometries.AddControl(NewGeometry);
            }
            this.AddControl(Geometries);
            _Materials = new PropertiesHolder();
            _Materials.SetTitleColor(Color.FromArgb(80, 80, 80));
            _Materials.Title   = "Materials";
            _Materials.Toggled = false;
            for (int i = 0; i < CurrentActor.Materials.Count; i++)
            {
                Properties_Material NewMaterial = new Properties_Material(Interface, CurrentActor, Dock, OpenForms, i);
                _Materials.AddControl(NewMaterial);
            }
            _AddMaterial = new PropertiesInput_Button("", "Add Material", new EventHandler(AddMaterial));
            _Materials.AddControl(_AddMaterial);
            this.AddControl(_Materials);
        }
예제 #2
0
        public void AddMaterial(object sender, EventArgs e)
        {
            _CurrentActor.Materials.Add(new Material("New Material", Material.Default));
            Properties_Material NewMaterial = new Properties_Material(_Interface, _CurrentActor, _Dock, _OpenForms, _CurrentActor.Materials.Count - 1);

            _Materials.AddControl(NewMaterial);
            _AddMaterial.BringToFront();
        }