Ejemplo n.º 1
0
        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
        }
Ejemplo n.º 2
0
        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
        }