void SaveShapeListOk(Window callingWindow) { string fileName = ((FileWindow)callingWindow).Results[0]; ShapeCollectionSave shapeSaveList = new ShapeCollectionSave(); shapeSaveList.AddPolygonList(EditorData.Polygons); shapeSaveList.AddAxisAlignedRectangleList(EditorData.AxisAlignedRectangles); shapeSaveList.AddCircleList(EditorData.Circles); shapeSaveList.AddAxisAlignedCubeList(EditorData.AxisAlignedCubes); shapeSaveList.AddSphereList(EditorData.Spheres); shapeSaveList.Save(fileName); #if FRB_MDX GameForm.TitleText = "PolygonEditor - Editing " + fileName; #else FlatRedBallServices.Game.Window.Title = "PolygonEditor Editing - " + fileName; #endif fileName = FileManager.RemoveExtension(fileName); fileName += ".pesix"; PolygonEditorSettings savedInformation = new PolygonEditorSettings(EditorData.LineGrid); savedInformation.BoundsCameraSave = CameraSave.FromCamera(EditorData.BoundsCamera); savedInformation.UsePixelCoordinates = SpriteManager.Camera.Orthogonal; savedInformation.Save(fileName); }
void SavePolygonListOk(Window callingWindow) { string fileName = ((FileWindow)callingWindow).Results[0]; PolygonSaveList polygonSaveList = new PolygonSaveList(); polygonSaveList.AddPolygonList(EditorData.Polygons); polygonSaveList.Save(fileName); #if FRB_MDX GameForm.TitleText = "PolygonEditor - Editing " + fileName; #else FlatRedBallServices.Game.Window.Title = "PolygonEditor Editing - " + fileName; #endif fileName = FileManager.RemoveExtension(fileName); fileName += ".pesix"; PolygonEditorSettings savedInformation = new PolygonEditorSettings(EditorData.LineGrid); savedInformation.Save(fileName); }