Beispiel #1
0
        public static Vector3 Do(int id, Vector3 handlePos, Vector3 offset, Vector3 handleDir, Vector3 slideDir1, Vector3 slideDir2, float handleSize, RuntimeHandles.DrawCapFunction drawFunc, Vector2 snap, bool drawHelper)
        {
            bool changed = GUI.changed;

            GUI.changed = false;
            Vector2 vector = Slider2D.CalcDeltaAlongDirections(id, handlePos, offset, handleDir, slideDir1, slideDir2, handleSize, drawFunc, snap, drawHelper);

            if (GUI.changed)
            {
                handlePos = Slider2D.s_StartPosition + slideDir1 * vector.x + slideDir2 * vector.y;
            }
            GUI.changed |= changed;
            return(handlePos);
        }
Beispiel #2
0
 public static Vector3 Do(int id, Vector3 handlePos, Vector3 offset, Vector3 handleDir, Vector3 slideDir1, Vector3 slideDir2, float handleSize, RuntimeHandles.DrawCapFunction drawFunc, float snap, bool drawHelper)
 {
     return(Slider2D.Do(id, handlePos, offset, handleDir, slideDir1, slideDir2, handleSize, drawFunc, new Vector2(snap, snap), drawHelper));
 }