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, Actor CurrentActor, DockPanel Dock, List <ToolForm> OpenForms, int Index) { this._Interface = Interface; this._CurrentActor = CurrentActor; this.Title = this._CurrentActor.Materials[Index].Name; this._Index = Index; _Name = new PropertiesInput_String("Name", _CurrentActor.Materials[Index].Name, new EventHandler(Name_Update)); this.AddControl(_Name); PropertiesInput_Material Material = new PropertiesInput_Material("Material", _CurrentActor.Materials[Index], Dock, OpenForms); this.AddControl(Material); this.SetTitleColor(Color.FromArgb(50, 50, 50)); }
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); }