public void Init(Game_Interface Interface) { _BlockEvents = false; this._Interface = Interface; _Interface.Update += new InterfaceUpdate(InterfaceUpdate); GenerateEntries(); }
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, PropertiesWindow Properties) { this._Interface = Interface; _Interface.Update += new Engineer.Interface.InterfaceUpdate(InterfaceUpdate); this._Properties = Properties; AssembleTree(); }
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) { this._BlockEvents = false; this._Interface = Interface; _Interface.Update += new Engineer.Interface.InterfaceUpdate(InterfaceUpdate); this._MouseDown = false; }
public void Init(Game_Interface Interface, DockPanel Dock, List <ToolForm> OpenForms) { _Interface = Interface; _Interface.Update += new InterfaceUpdate(InterfaceUpdate); this.ContentPanel.Padding = new Padding(10); this._Dock = Dock; this._OpenForms = OpenForms; }
public void Init(Game_Interface Interface, string FileRoot) { this._BlockEvents = false; this._Interface = Interface; _Interface.Update += new InterfaceUpdate(InterfaceUpdate); _LibraryRoot = FileRoot; SetLibraryView(LibraryViewType.Library); }
public void Init(Game_Interface Interface, Sprite CurrentSprite, DockPanel Dock, List <ToolForm> OpenForms) { this._Interface = Interface; this._Dock = Dock; this._OpenForms = OpenForms; this._CurrentSprite = CurrentSprite; PropertiesInput_Sprite Sprite = new PropertiesInput_Sprite("SpriteSets", CurrentSprite, Dock, OpenForms); this.AddControl(Sprite); }
public void Init(Game_Interface Interface, Actor CurrentActor, int Index) { this._Interface = Interface; this._CurrentActor = CurrentActor; this.Title = this._CurrentActor.Geometries[Index].Name; this._Index = Index; PropertiesInput_Label Name = new PropertiesInput_Label("Name", _CurrentActor.Geometries[Index].Name); this.AddControl(Name); GenerateMaterialList(); this.SetTitleColor(Color.FromArgb(50, 50, 50)); }
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)); }
private void Init() { _BlockEvents = false; if (OpenForms == null) { OpenForms = new List <ToolForm>(); } this._Interface = new Game_Interface(null); GenerateLayout(); _Interface.Update += new Interface.InterfaceUpdate(InterfaceUpdate); this.Title = "Engineer " + Version; this.Text = "Engineer " + Version; _Interface.CurrentScene = null; }
public void Init(Game_Interface Interface, DrawObject CurrentDrawObject) { this._Interface = Interface; this._CurrentDrawObject = CurrentDrawObject; PropertiesInput_Label Type = new PropertiesInput_Label("Type", _CurrentDrawObject.Type.ToString()); this.AddControl(Type); _Active = new PropertiesInput_Bool("Active", _CurrentDrawObject.Active, new EventHandler(ActiveChanged)); this.AddControl(_Active); _Translation = new PropertiesInput_Vertex("Translation", _CurrentDrawObject.Translation, new EventHandler(TranslationChanged)); this.AddControl(_Translation); _Rotation = new PropertiesInput_Vertex("Rotation", _CurrentDrawObject.Rotation, new EventHandler(RotationChanged)); this.AddControl(_Rotation); _Scale = new PropertiesInput_Vertex("Scale", _CurrentDrawObject.Scale, new EventHandler(ScaleChanged)); this.AddControl(_Scale); }
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); }
public static void Draw() { Graphics g = __Buffer.Graphics; g.Clear(Color.Black); g.DrawImage(background, 0, 0); __Interface = new Game_Interface(new Point(0, 0), new Point(0, 0), new Size(0, 0)); g.DrawString(" " + asteroid_score, new Font(FontFamily.GenericSerif, 20, FontStyle.Bold), Brushes.PeachPuff, 400, 0); g.DrawString(" " + __SpaceShip.EnergyShip, new Font(FontFamily.GenericSerif, 20, FontStyle.Bold), Brushes.PeachPuff, 265, 40); __Interface.Draw(g); foreach (var game_object in __GameObjects) { game_object?.Draw(g); } foreach (Asteroids asteroids in __Asteroids) { asteroids.Draw(g); } foreach (Health health in __Healths) { health.Draw(g); } __SpaceShip?.Draw(g); __Bullet?.Draw(g); if (__SpaceShip != null) { if (!__Timer.Enabled) { return; } } __Buffer.Render(); }
private void saveToolStripMenuItem_Click(object sender, EventArgs e) { if (_BlockEvents) { return; } SaveFileDialog Dialog = new SaveFileDialog(); Dialog.Filter = "Engineer Format XML (*.efx)|*.efx"; if (Dialog.ShowDialog() == DialogResult.OK && Dialog.FileName != "") { string ErrorMessage = ""; Game Current = _Interface.CurrentGame; if (Game_Interface.SaveGame(Dialog.FileName, ref Current, ref ErrorMessage)) { } else { MessageBox.Show(ErrorMessage, "Error"); } } }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { if (_BlockEvents) { return; } OpenFileDialog Dialog = new OpenFileDialog(); Dialog.Filter = "Engineer Format XML (*.efx)|*.efx"; if (Dialog.ShowDialog() == DialogResult.OK && Dialog.FileName != "") { string ErrorMessage = ""; Game LoadedGame = null; if (Game_Interface.LoadGame(Dialog.FileName, ref LoadedGame, ref ErrorMessage)) { _Interface.CurrentGame = LoadedGame; } else { MessageBox.Show(ErrorMessage, "Error"); } } }
public Properties_Event(Game_Interface Interface, object EventCaller) { InitializeComponent(); Init(Interface, EventCaller, 0, -1, false); }
public Properties_Scene(Game_Interface Interface, Scene CurrentScene) { InitializeComponent(); Init(Interface, CurrentScene); }
public Properties_Geometry(Game_Interface Interface, Actor CurrentActor, int Index) { InitializeComponent(); Init(Interface, CurrentActor, Index); }
public Properties_Material(Game_Interface Interface, Actor CurrentActor, DockPanel Dock, List <ToolForm> OpenForms, int Index) { InitializeComponent(); Init(Interface, CurrentActor, Dock, OpenForms, Index); }
public GlobalAssets(Game_Interface Interface) { InitializeComponent(); this._Interface = Interface; InitFilters(); }
public Properties_DrawObject(Game_Interface Interface, DrawObject CurrentDrawObject) { InitializeComponent(); Init(Interface, CurrentDrawObject); }
public ContentLibrary(Game_Interface Interface, string FileRoot) { InitializeComponent(); Init(Interface, FileRoot); }
public Properties_Actor(Game_Interface Interface, Actor CurrentActor, DockPanel Dock, List <ToolForm> OpenForms) { InitializeComponent(); Init(Interface, CurrentActor, Dock, OpenForms); }
public PropertiesWindow(Game_Interface Interface, DockPanel Dock, List <ToolForm> OpenForms) { InitializeComponent(); Init(Interface, Dock, OpenForms); }
public SceneWindow(Game_Interface Interface, PropertiesWindow Properties) { InitializeComponent(); Init(Interface, Properties); }
public Properties_Event(Game_Interface Interface, object EventCaller, int Type, int Index, bool Locked) { InitializeComponent(); Init(Interface, EventCaller, Type, Index, Locked); }
public Properties_Sprite(Game_Interface Interface, Sprite CurrentSprite, DockPanel Dock, List <ToolForm> OpenForms) { InitializeComponent(); Init(Interface, CurrentSprite, Dock, OpenForms); }
public GameWindow(Game_Interface Interface) { InitializeComponent(); Init(Interface); }