private void GenerateMaterialList()
        {
            List <string> Names = new List <string>();

            for (int i = 0; i < _CurrentActor.Materials.Count; i++)
            {
                Names.Add(_CurrentActor.Materials[i].Name);
            }
            _MatList = new PropertiesInput_Combo("Material", Names, _CurrentActor.GeometryMaterialIndices[_Index], new EventHandler(MatList_Update));
            this.AddControl(_MatList);
        }
Esempio n. 2
0
        public void Init(Game_Interface Interface, object EventCaller, int Type, int Index, bool Locked)
        {
            this._Type       = Type;
            this._Index      = Index;
            this._Interface  = Interface;
            _EventTypeString = new List <string>();
            List <string> EventScriptString = new List <string>();

            if (EventCaller.GetType().IsSubclassOf(typeof(Scene)))
            {
                this._Scene = (Scene)EventCaller;
                for (int i = 0; i < _Scene.Events.EventList.Count; i++)
                {
                    _EventTypeString.Add(_Scene.Events.EventList[i].ID);
                }
                EventScriptString = Scene_Interface.GetPossibleEventNames(_Scene, _Scene.Events.EventList[Type].ID);
            }
            else if (EventCaller.GetType().IsSubclassOf(typeof(SceneObject)))
            {
                this._SceneObject = (SceneObject)EventCaller;
                for (int i = 0; i < _SceneObject.Events.EventList.Count; i++)
                {
                    _EventTypeString.Add(_SceneObject.Events.EventList[i].ID);
                }
                EventScriptString = Scene_Interface.GetPossibleEventNames(_SceneObject.ParentScene, _SceneObject.Events.EventList[Type].ID);
            }
            this.ClearControls();
            _EventTypes = new PropertiesInput_Combo("Type", _EventTypeString, Type, new EventHandler(EventTypeUpdate));
            this.AddControl(_EventTypes);
            _PossibleEvents = new PropertiesInput_Combo("Event", EventScriptString, Index, new EventHandler(EventScriptUpdate));
            this.AddControl(_PossibleEvents);
            if (Locked)
            {
                _EventTypes.Lock();
                _PossibleEvents.Lock();
                PropertiesInput_Button Delete = new PropertiesInput_Button("", "Remove Event", new EventHandler(RemoveEvent));
                this.AddControl(Delete);
            }
            else
            {
                PropertiesInput_Button Lock = new PropertiesInput_Button("", "Lock", new EventHandler(LockEvent));
                this.AddControl(Lock);
            }
            this.SetTitleColor(Color.FromArgb(80, 80, 80));
        }