Example #1
0
        /// <summary>
        /// Put cursor back to normal.
        /// </summary>
        /// <param name="args">Mouse event arguments.</param>
        protected override void OnMouseOut(MouseEventArgs args)
        {
            base.OnMouseOut(args);

            // Set back mouse cursor
            GUIManager.SetMouseCursor(MouseState.Normal);
        }
Example #2
0
        /// <summary>
        /// Change the mouse cursor to resizing cursor.
        /// </summary>
        private void ShowResizeCursor()
        {
            // Set new mouse cursor
            switch (this.resizeArea)
            {
            case ResizeAreas.Top:
            case ResizeAreas.Bottom:
                GUIManager.SetMouseCursor(MouseState.ResizingNS);
                break;

            case ResizeAreas.Left:
            case ResizeAreas.Right:
                GUIManager.SetMouseCursor(MouseState.ResizingWE);
                break;

            case ResizeAreas.TopLeft:
            case ResizeAreas.BottomRight:
                GUIManager.SetMouseCursor(MouseState.ResizingNWSE);
                break;

            case ResizeAreas.TopRight:
            case ResizeAreas.BottomLeft:
                GUIManager.SetMouseCursor(MouseState.ResizingNESW);
                break;
            }
        }