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); }
public void Init(Game_Interface Interface, SceneObject CurrentSceneObject) { this._Interface = Interface; this._CurrentSceneObject = CurrentSceneObject; string SceneObjectTypeString = ""; if (CurrentSceneObject.Type == SceneObjectType.DrawnSceneObject) { SceneObjectTypeString = "DrawnSceneObject"; } else if (CurrentSceneObject.Type == SceneObjectType.ScriptSceneObject) { SceneObjectTypeString = "ScriptSceneObject"; } else { SceneObjectTypeString = "Undefined"; } _Name = new PropertiesInput_String("Name", CurrentSceneObject.Name, new EventHandler(NameChanged)); this.AddControl(_Name); PropertiesInput_Label Type = new PropertiesInput_Label("Type", SceneObjectTypeString); this.AddControl(Type); for (int i = 0; i < CurrentSceneObject.Events.EventList.Count; i++) { for (int j = 0; j < CurrentSceneObject.Events.EventList[i].Events.Count; j++) { Properties_Event NewEvent = new Properties_Event(); NewEvent.Init(_Interface, _CurrentSceneObject, Scene_Interface.GetPossibleEventNames(_Interface.CurrentScene, _Interface.CurrentScene.Events.EventList[i].ID).IndexOf(_Interface.CurrentScene.Events.EventList[i].Events[j].ID), i, true); this.AddControl(NewEvent); } } _AddNewEvent = new PropertiesInput_Button("", "Add New Event", new EventHandler(AddNewEvent_Click)); this.AddControl(_AddNewEvent); }
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)); }
public void Init(Game_Interface Interface, Scene CurrentScene) { this._Scene = CurrentScene; this._Interface = Interface; _SceneName = new PropertiesInput_String("Name", CurrentScene.Name, new EventHandler(Name_Update)); this.AddControl(_SceneName); for (int i = 0; i < _Scene.Events.EventList.Count; i++) { for (int j = 0; j < _Scene.Events.EventList[i].Events.Count; j++) { Properties_Event NewEvent = new Properties_Event(_Interface, _Scene, i, Scene_Interface.GetPossibleEventNames(_Scene, _Scene.Events.EventList[i].ID).IndexOf(_Scene.Events.EventList[i].Events[j].ID), true); this.AddControl(NewEvent); } } _AddNewEvent = new PropertiesInput_Button("", "Add New Event", new EventHandler(AddNewEvent_Click)); this.AddControl(_AddNewEvent); }