Example #1
0
        protected void HandleBorderPointSlider(ref float x, ref float y, MouseCursor mouseCursor, bool isHidden, GUIStyle dragDot, GUIStyle dragDotActive, Color color)
        {
            Color color2 = GUI.color;

            if (isHidden)
            {
                GUI.color = new Color(0f, 0f, 0f, 0f);
            }
            else
            {
                GUI.color = color;
            }
            Vector2 vector = SpriteEditorHandles.PointSlider(new Vector2(x, y), mouseCursor, dragDot, dragDotActive);

            x         = vector.x;
            y         = vector.y;
            GUI.color = color2;
        }
Example #2
0
        protected void HandleBorderPointSlider(ref float x, ref float y, MouseCursor mouseCursor, bool isHidden, GUIStyle dragDot, GUIStyle dragDotActive, Color color)
        {
            var originalColor = GUI.color;

            if (isHidden)
            {
                GUI.color = new Color(0, 0, 0, 0);
            }
            else
            {
                GUI.color = color;
            }

            Vector2 point = SpriteEditorHandles.PointSlider(new Vector2(x, y), mouseCursor, dragDot, dragDotActive);

            x = point.x;
            y = point.y;

            GUI.color = originalColor;
        }