private static void CreatePropertyGrids() { #region CamerPropertyGrid mCameraPropertyGrid = new CameraPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mCameraPropertyGrid); mCameraPropertyGrid.SelectedObject = SpriteManager.Camera; mCameraPropertyGrid.X = mCameraPropertyGrid.ScaleX; mCameraPropertyGrid.Y = 40; mCameraPropertyGrid.HasCloseButton = true; mCameraPropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion #region NodeNetwork PropertyGrid mNodeNetworkPropertyGrid = new NodeNetworkPropertyGrid(); mNodeNetworkPropertyGrid.SelectedObject = EditorData.NodeNetwork; mNodeNetworkPropertyGrid.X = mNodeNetworkPropertyGrid.ScaleX; mNodeNetworkPropertyGrid.Y = 61; mNodeNetworkPropertyGrid.HasCloseButton = true; mNodeNetworkPropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion #region ScenePropertyGrid mScenePropertyGrid = new ScenePropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mScenePropertyGrid); mScenePropertyGrid.X = mScenePropertyGrid.ScaleX; mScenePropertyGrid.Y = 75.7f; mScenePropertyGrid.ShowPropertyGridOnStrongSelect = true; mScenePropertyGrid.HasCloseButton = true; mScenePropertyGrid.Visible = false; mScenePropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion #region ShapeCollectionPropertyGrid mShapeCollectionPropertyGrid = new ShapeCollectionPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mShapeCollectionPropertyGrid); mShapeCollectionPropertyGrid.ShowPropertyGridOnStrongSelectAxisAlignedCube = true; mShapeCollectionPropertyGrid.ShowPropertyGridOnStrongSelectAxisAlignedRectangle = true; mShapeCollectionPropertyGrid.ShowPropertyGridOnStrongSelectCircle = true; mShapeCollectionPropertyGrid.ShowPropertyGridOnStrongSelectPolygon = true; mShapeCollectionPropertyGrid.ShowPropertyGridOnStrongSelectSphere = true; mShapeCollectionPropertyGrid.HasCloseButton = true; mShapeCollectionPropertyGrid.Visible = false; mShapeCollectionPropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion PropertyGrid.SetNewWindowEvent <FlatRedBall.AI.Pathfinding.PositionedNode>(CreatePositionedNodePropertyGrid); PropertyGrid.SetNewWindowEvent <Color>(CreateColorPropertyGrid); #region EditorPropertiesGrid mEditorPropertiesGrid = new EditorPropertiesGrid(); mEditorPropertiesGrid.Visible = false; #endregion }
private static void CreatePropertyGrids() { #region CamerPropertyGrid mCameraPropertyGrid = new CameraPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mCameraPropertyGrid); mCameraPropertyGrid.SelectedObject = SpriteManager.Camera; mCameraPropertyGrid.X = mCameraPropertyGrid.ScaleX; mCameraPropertyGrid.Y = 40; mCameraPropertyGrid.HasCloseButton = true; mCameraPropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion #region NodeNetwork PropertyGrid mNodeNetworkPropertyGrid = new NodeNetworkPropertyGrid(); mNodeNetworkPropertyGrid.SelectedObject = EditorData.NodeNetwork; mNodeNetworkPropertyGrid.X = mNodeNetworkPropertyGrid.ScaleX; mNodeNetworkPropertyGrid.Y = 61; mNodeNetworkPropertyGrid.HasCloseButton = true; mNodeNetworkPropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion #region ScenePropertyGrid mScenePropertyGrid = new ScenePropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mScenePropertyGrid); mScenePropertyGrid.X = mScenePropertyGrid.ScaleX; mScenePropertyGrid.Y = 75.7f; mScenePropertyGrid.ShowPropertyGridOnStrongSelect = true; mScenePropertyGrid.HasCloseButton = true; mScenePropertyGrid.Visible = false; mScenePropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion #region ShapeCollectionPropertyGrid mShapeCollectionPropertyGrid = new ShapeCollectionPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mShapeCollectionPropertyGrid); mShapeCollectionPropertyGrid.ShowPropertyGridOnStrongSelectAxisAlignedCube = true; mShapeCollectionPropertyGrid.ShowPropertyGridOnStrongSelectAxisAlignedRectangle = true; mShapeCollectionPropertyGrid.ShowPropertyGridOnStrongSelectCircle = true; mShapeCollectionPropertyGrid.ShowPropertyGridOnStrongSelectPolygon = true; mShapeCollectionPropertyGrid.ShowPropertyGridOnStrongSelectSphere = true; mShapeCollectionPropertyGrid.HasCloseButton = true; mShapeCollectionPropertyGrid.Visible = false; mShapeCollectionPropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion PropertyGrid.SetNewWindowEvent<FlatRedBall.AI.Pathfinding.PositionedNode>(CreatePositionedNodePropertyGrid); PropertyGrid.SetNewWindowEvent<Color>(CreateColorPropertyGrid); #region EditorPropertiesGrid mEditorPropertiesGrid = new EditorPropertiesGrid(); mEditorPropertiesGrid.Visible = false; #endregion }
static void CreatePropertyGrids() { PropertyGrid.SetPropertyGridTypeAssociation(typeof(FlatRedBall.Instructions.InstructionBlueprint), typeof(InstructionBlueprintPropertyGrid <Sprite>)); #region EmitterPropertyGrid mEmitterPropertyGrid = new EmitterPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mEmitterPropertyGrid); EmitterPropertyGrid.ContentManagerName = AppState.Self.PermanentContentManager; EmitterPropertyGrid.UndoInstructions = UndoManager.Instructions; #region Reset EmissionSettings Button Button settingsButton = EmitterPropertyGrid.GetUIElementForMember("EmissionSettings") as Button; Type t = typeof(Window); FieldInfo f = t.GetField("Click", BindingFlags.Default | BindingFlags.SetField | BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic); f.SetValue(settingsButton, null); settingsButton.Click += ShowEmissionSettingsPropertyGrid; #endregion #endregion #region Editor CameraPropertyGrid mCameraPropertyGrid = new CameraPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mCameraPropertyGrid); mCameraPropertyGrid.SelectedObject = SpriteManager.Camera; mCameraPropertyGrid.MakeFieldOfViewAndAspectRatioReadOnly(); mCameraPropertyGrid.Visible = false; #endregion #region Bounds CameraPropertyGrid mCameraBoundsPropertyGrid = new CameraBoundsPropertyGrid( new Camera(AppState.Self.PermanentContentManager)); mCameraBoundsPropertyGrid.Visible = false; #endregion #region EditorPropertiesGrid mEditorPropertiesGrid = new EditorPropertiesGrid(); mEditorPropertiesGrid.Visible = false; #endregion #region ScenePropertyGrid mScenePropertyGrid = new ScenePropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mScenePropertyGrid); mScenePropertyGrid.HasCloseButton = true; mScenePropertyGrid.Visible = false; mScenePropertyGrid.ShowPropertyGridOnStrongSelect = true; #endregion #region EmissionSettingsPropertyGrid List <String> filterList = new List <String>(); filterList.Add("ordered"); filterList.Add("JustCycled"); filterList.Add("TimeUntilNextFrame"); filterList.Add("TimeCreated"); filterList.Add("state"); filterList.Add("Name"); InstructionBlueprintPropertyGrid <Sprite> .MemberFilter.Add(typeof(Sprite), filterList); mEmissionSettingsPropertyGrid = new EmissionSettingsPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mEmissionSettingsPropertyGrid); mEmissionSettingsPropertyGrid.HasCloseButton = true; mEmissionSettingsPropertyGrid.Visible = false; mEmissionSettingsPropertyGrid.ContentManagerName = AppState.Self.PermanentContentManager; mEmissionSettingsPropertyGrid.UndoInstructions = UndoManager.Instructions; mEmissionSettingsPropertyGrid.InstructionDisplayWindow.ListDisplayWindow.ListBox.CursorOver += MouseOverEmissionSettingsGrid; #endregion }
private static void CreatePropertyGrids() { //mSpritePropertyGrid = new SpritePropertyGrid(GuiManager.Cursor); //GuiManager.AddWindow(mSpritePropertyGrid); //mSpritePropertyGrid.Visible = false; //mSpritePropertyGrid.X = mSpritePropertyGrid.ScaleX; //mSpritePropertyGrid.Y = 53.8381f; //mSpritePropertyGrid.UndoInstructions = UndoManager.Instructions; mSceneCameraPropertyGrid = new CameraPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mSceneCameraPropertyGrid); mSceneCameraPropertyGrid.Visible = false; mSceneCameraPropertyGrid.SelectedObject = EditorData.SceneCamera; mSceneCameraPropertyGrid.Name = "Camera Bounds"; mSceneCameraPropertyGrid.UndoInstructions = UndoManager.Instructions; //mSpriteFramePropertyGrid = new SpriteFramePropertyGrid(GuiManager.Cursor); //GuiManager.AddWindow(mSpriteFramePropertyGrid); //mSpriteFramePropertyGrid.Visible = false; //mSpriteFramePropertyGrid.UndoInstructions = UndoManager.Instructions; //mPositionedModelPropertyGrid = new PositionedModelPropertyGrid(GuiManager.Cursor); //GuiManager.AddWindow(mPositionedModelPropertyGrid); //mPositionedModelPropertyGrid.Visible = false; //mPositionedModelPropertyGrid.UndoInstructions = UndoManager.Instructions; //mTextPropertyGrid = new TextPropertyGrid(GuiManager.Cursor); //GuiManager.AddWindow(mTextPropertyGrid); //mTextPropertyGrid.Visible = false; //mTextPropertyGrid.X = mSpritePropertyGrid.ScaleX; //mTextPropertyGrid.Y = 53.8381f; //mTextPropertyGrid.UndoInstructions = UndoManager.Instructions; mUsedPropertySelectionWindow.Visible = false; mKeyframePropertyGrid = new InstructionListPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mKeyframePropertyGrid); mKeyframePropertyGrid.ShowInstructionPropertyGridOnStrongSelect = true; mKeyframePropertyGrid.Name = "Keyframe Properties"; mKeyframePropertyGrid.HasCloseButton = true; mKeyframePropertyGrid.OverwriteInstructionList += UpdateCurrentKeyframe; mKeyframePropertyGrid.UndoInstructions = UndoManager.Instructions; #region Scene Property Grid mScenePropertyGrid = new ScenePropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mScenePropertyGrid); mScenePropertyGrid.SpriteSelected += SpriteHighlight; mScenePropertyGrid.SpriteFrameSelected += SpriteFrameHighlight; mScenePropertyGrid.PositionedModelSelected += PositionedModelHighlight; mScenePropertyGrid.TextSelected += TextHighlight; mScenePropertyGrid.X = 17.23276f; mScenePropertyGrid.Y = 22.30255f; mScenePropertyGrid.HasCloseButton = true; mScenePropertyGrid.ShowPropertyGridOnStrongSelect = true; mScenePropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion #region Editor Camera Property Grid mEditorCameraPropertyGrid = new CameraPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mEditorCameraPropertyGrid); mEditorCameraPropertyGrid.Visible = false; mEditorCameraPropertyGrid.MakeFieldOfViewAndAspectRatioReadOnly(); mEditorCameraPropertyGrid.SelectedObject = SpriteManager.Camera; mEditorCameraPropertyGrid.Name = "Editor Camera"; mEditorCameraPropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion #region EditorOptions Property Grid mEditorOptionsPropertyGrid = GuiManager.AddPropertyGrid <EditorOptions>(); mEditorOptionsPropertyGrid.Visible = false; mEditorOptionsPropertyGrid.SelectedObject = EditorData.EditorOptions; mEditorOptionsPropertyGrid.HasCloseButton = true; mEditorOptionsPropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion }
private static void CreatePropertyGrids() { //mSpritePropertyGrid = new SpritePropertyGrid(GuiManager.Cursor); //GuiManager.AddWindow(mSpritePropertyGrid); //mSpritePropertyGrid.Visible = false; //mSpritePropertyGrid.X = mSpritePropertyGrid.ScaleX; //mSpritePropertyGrid.Y = 53.8381f; //mSpritePropertyGrid.UndoInstructions = UndoManager.Instructions; mSceneCameraPropertyGrid = new CameraPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mSceneCameraPropertyGrid); mSceneCameraPropertyGrid.Visible = false; mSceneCameraPropertyGrid.SelectedObject = EditorData.SceneCamera; mSceneCameraPropertyGrid.Name = "Camera Bounds"; mSceneCameraPropertyGrid.UndoInstructions = UndoManager.Instructions; //mSpriteFramePropertyGrid = new SpriteFramePropertyGrid(GuiManager.Cursor); //GuiManager.AddWindow(mSpriteFramePropertyGrid); //mSpriteFramePropertyGrid.Visible = false; //mSpriteFramePropertyGrid.UndoInstructions = UndoManager.Instructions; //mPositionedModelPropertyGrid = new PositionedModelPropertyGrid(GuiManager.Cursor); //GuiManager.AddWindow(mPositionedModelPropertyGrid); //mPositionedModelPropertyGrid.Visible = false; //mPositionedModelPropertyGrid.UndoInstructions = UndoManager.Instructions; //mTextPropertyGrid = new TextPropertyGrid(GuiManager.Cursor); //GuiManager.AddWindow(mTextPropertyGrid); //mTextPropertyGrid.Visible = false; //mTextPropertyGrid.X = mSpritePropertyGrid.ScaleX; //mTextPropertyGrid.Y = 53.8381f; //mTextPropertyGrid.UndoInstructions = UndoManager.Instructions; mUsedPropertySelectionWindow.Visible = false; mKeyframePropertyGrid = new InstructionListPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mKeyframePropertyGrid); mKeyframePropertyGrid.ShowInstructionPropertyGridOnStrongSelect = true; mKeyframePropertyGrid.Name = "Keyframe Properties"; mKeyframePropertyGrid.HasCloseButton = true; mKeyframePropertyGrid.OverwriteInstructionList += UpdateCurrentKeyframe; mKeyframePropertyGrid.UndoInstructions = UndoManager.Instructions; #region Scene Property Grid mScenePropertyGrid = new ScenePropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mScenePropertyGrid); mScenePropertyGrid.SpriteSelected += SpriteHighlight; mScenePropertyGrid.SpriteFrameSelected += SpriteFrameHighlight; mScenePropertyGrid.PositionedModelSelected += PositionedModelHighlight; mScenePropertyGrid.TextSelected += TextHighlight; mScenePropertyGrid.X = 17.23276f; mScenePropertyGrid.Y = 22.30255f; mScenePropertyGrid.HasCloseButton = true; mScenePropertyGrid.ShowPropertyGridOnStrongSelect = true; mScenePropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion #region Editor Camera Property Grid mEditorCameraPropertyGrid = new CameraPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mEditorCameraPropertyGrid); mEditorCameraPropertyGrid.Visible = false; mEditorCameraPropertyGrid.MakeFieldOfViewAndAspectRatioReadOnly(); mEditorCameraPropertyGrid.SelectedObject = SpriteManager.Camera; mEditorCameraPropertyGrid.Name = "Editor Camera"; mEditorCameraPropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion #region EditorOptions Property Grid mEditorOptionsPropertyGrid = GuiManager.AddPropertyGrid<EditorOptions>(); mEditorOptionsPropertyGrid.Visible = false; mEditorOptionsPropertyGrid.SelectedObject = EditorData.EditorOptions; mEditorOptionsPropertyGrid.HasCloseButton = true; mEditorOptionsPropertyGrid.UndoInstructions = UndoManager.Instructions; #endregion }
static void CreatePropertyGrids() { PropertyGrid.SetPropertyGridTypeAssociation(typeof(FlatRedBall.Instructions.InstructionBlueprint), typeof(InstructionBlueprintPropertyGrid<Sprite>)); #region EmitterPropertyGrid mEmitterPropertyGrid = new EmitterPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mEmitterPropertyGrid); EmitterPropertyGrid.ContentManagerName = AppState.Self.PermanentContentManager; EmitterPropertyGrid.UndoInstructions = UndoManager.Instructions; #region Reset EmissionSettings Button Button settingsButton = EmitterPropertyGrid.GetUIElementForMember("EmissionSettings") as Button; Type t = typeof(Window); FieldInfo f = t.GetField("Click", BindingFlags.Default | BindingFlags.SetField | BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic); f.SetValue(settingsButton, null); settingsButton.Click += ShowEmissionSettingsPropertyGrid; #endregion #endregion #region Editor CameraPropertyGrid mCameraPropertyGrid = new CameraPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mCameraPropertyGrid); mCameraPropertyGrid.SelectedObject = SpriteManager.Camera; mCameraPropertyGrid.MakeFieldOfViewAndAspectRatioReadOnly(); mCameraPropertyGrid.Visible = false; #endregion #region Bounds CameraPropertyGrid mCameraBoundsPropertyGrid = new CameraBoundsPropertyGrid( new Camera(AppState.Self.PermanentContentManager)); mCameraBoundsPropertyGrid.Visible = false; #endregion #region EditorPropertiesGrid mEditorPropertiesGrid = new EditorPropertiesGrid(); mEditorPropertiesGrid.Visible = false; #endregion #region ScenePropertyGrid mScenePropertyGrid = new ScenePropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mScenePropertyGrid); mScenePropertyGrid.HasCloseButton = true; mScenePropertyGrid.Visible = false; mScenePropertyGrid.ShowPropertyGridOnStrongSelect = true; #endregion #region EmissionSettingsPropertyGrid List<String> filterList = new List<String>(); filterList.Add("ordered"); filterList.Add("JustCycled"); filterList.Add("TimeUntilNextFrame"); filterList.Add("TimeCreated"); filterList.Add("state"); filterList.Add("Name"); InstructionBlueprintPropertyGrid<Sprite>.MemberFilter.Add(typeof(Sprite), filterList); mEmissionSettingsPropertyGrid = new EmissionSettingsPropertyGrid(GuiManager.Cursor); GuiManager.AddWindow(mEmissionSettingsPropertyGrid); mEmissionSettingsPropertyGrid.HasCloseButton = true; mEmissionSettingsPropertyGrid.Visible = false; mEmissionSettingsPropertyGrid.ContentManagerName = AppState.Self.PermanentContentManager; mEmissionSettingsPropertyGrid.UndoInstructions = UndoManager.Instructions; mEmissionSettingsPropertyGrid.InstructionDisplayWindow.ListDisplayWindow.ListBox.CursorOver += MouseOverEmissionSettingsGrid; #endregion }