public GameForm() : base() { this.DragEnter += new System.Windows.Forms.DragEventHandler(this.GameForm_DragDrop); this.Text = "SpriteEditor - untitled scene"; camera = new SpriteEditor.SEPositionedObjects.EditorCamera(FlatRedBallServices.GlobalContentManager); SpriteManager.Cameras[0] = camera; camera.DestinationRectangle = new Rectangle(0, 0, FlatRedBallServices.ClientWidth, FlatRedBallServices.ClientHeight); camera.FixAspectRatioYConstant(); if (this.IsDisposed) { return; } // this is a little different than what is normally done in the FRBTemplate; // instead of using the SpriteManager's regularly created Camera, make a new // EditorCamera and throw that in the SpriteManager's array. cursor = new SECursor(camera, this); //GuiManager.Initialize(camera, "genGfx/defaultText.tga", this, cursor); GuiManager.Cursors[0] = cursor; FlatRedBallServices.Update(null); SpriteEditorSettings.Initialize(); SpriteManager.MaxParticleCount = 10000; GameData.Initialize(); GuiData.Initialize(); GuiData.messages.Initialize(this); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { Renderer.UseRenderTargets = false; FlatRedBallServices.InitializeFlatRedBall(this, graphics); this.IsFixedTimeStep = false; mFormMethods = new EditorObjects.FormMethods(); EditorData.Initialize(); LightManager.AddAmbientLight(Color.White); GuiData.Initialize(); IsMouseVisible = true; // Uncomment the following line and add your Screen's fully qualified name // if using Screens in your project. If not, or if you don't know what it means, // just ignore the following line for now. // For more information on Screens see the Screens wiki article on FlatRedBall.com. //Screens.ScreenManager.Start(typeof(AIEditor.Screens.TestScreen).FullName); foreach (string s in Environment.GetCommandLineArgs()) { ProcessCommandLineArgument(s); } base.Initialize(); }
public static void Initialize() { SpriteManager.Camera.CameraCullMode = CameraCullMode.None; mEditorLogic = new EditorLogic(); GuiData.Initialize(); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { FlatRedBallServices.InitializeFlatRedBall(this, graphics); InitializeIoc(); this.TargetElapsedTime = TimeSpan.FromSeconds(1 / 30.0); mToolForm = new ToolForm(); mToolForm.Owner = (Form)(Form.FromHandle(FlatRedBallServices.WindowHandle)); mToolForm.ItemCollapsedOrExpanded += HandleToolFormItemCollapsedOrExpanded; Plugin.PluginManager.Initialize(); IsMouseVisible = true; IsFixedTimeStep = false; GuiData.Initialize(); RegisterAdditionalAssemblies(); AvailableAssetTypes.Self.Initialize(FileManager.RelativeDirectory); #region Set up resizing mFormMethods = new FormMethods(0, 0, 0, 0); #endregion SpriteManager.Camera.BackgroundColor = Color.Gray; FlatRedBall.Math.Geometry.Polygon.TolerateEmptyPolygons = true; ExposedVariableManager.Initialize(); try { RemotingServer.SetupPort(8686); RemotingServer.SetupInterface <FlatRedBall.Glue.SelectionInterface>(); RemotingServer.SetupInterface <RegisterInterface>(); } catch (Exception e) { System.Windows.Forms.MessageBox.Show("GlueView could not start, please make sure GlueView is not already running on your computer \n \n Exception: \n" + e.ToString()); FlatRedBall.FlatRedBallServices.Game.Exit(); } mToolForm.Show(); GluxManager.ContentManagerName = "GlueView"; EditorLogic.Initialize(); CommandLineManager.Self.ProcessCommandLineArgs(this.mToolForm); mainForm = Form.FromHandle(FlatRedBallServices.WindowHandle) as Form; mainForm.Resize += HandleResize; base.Initialize(); }
public static void Initialize() { // Create the mBoundsCamera before the GUI since the GUI will create a PropertyGrid for this object. mBoundsCamera = new Camera(FlatRedBallServices.GlobalContentManager); mBoundsCamera.DrawsWorld = false; mBoundsCamera.DrawsToScreen = false; // This needs to happen after the bounds camera is created, but before GuiData is initialized. mEditorLogic = new EditorLogic(); GuiData.Initialize(); // make resizable new EditorObjects.FormMethods(); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { FlatRedBallServices.InitializeFlatRedBall(this, _graphics); IsMouseVisible = true; GuiData.Initialize(); AvailableAssetTypes.Initialize(FileManager.RelativeDirectory + "Content/ContentTypes.csv"); #region Set up resizing Renderer.UseRenderTargets = false; #endregion try { RemotingServer.SetupPort(9426); RemotingServer.SetupInterface <SelectionInterface>(); RemotingServer.SetupInterface <RegisterInterface>(); } catch (Exception e) { System.Windows.Forms.MessageBox.Show(@"Level Editor could not start, please make sure Level Editor is not already running on your computer Exception: " + e); FlatRedBallServices.Game.Exit(); } GluxManager.ContentManagerName = "LevelEditor"; EditorLogic.Initialize(); base.Initialize(); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { FlatRedBallServices.InitializeFlatRedBall(this, graphics); //SpriteManager.Camera.LightingEnabled = true; //SpriteManager.Camera.Lights.SetDefaultLighting(FlatRedBall.Graphics.Lighting.LightCollection.DefaultLightingSetup.Evening); FlatRedBall.Graphics.Lighting.LightManager.AddAmbientLight(Color.White); IsMouseVisible = true; GuiManager.IsUIEnabled = true; SpriteManager.Camera.CameraModelCullMode = FlatRedBall.Graphics.CameraModelCullMode.None; EditorData.Initialize(null); GuiData.Initialize(); ProcessCommandLineArguments(); // TODO: Set the name of the file that the user is editing. base.Initialize(); }