Init() private method

private Init ( Rect buttonRect ) : void
buttonRect UnityEngine.Rect
return void
Exemplo n.º 1
0
        internal static bool ShowAtPosition(Rect buttonRect, AnimationWindowState state)
        {
            long num = DateTime.Now.Ticks / 0x2710L;

            if (num < (s_LastClosedTime + 50L))
            {
                return(false);
            }
            Event.current.Use();
            if (s_AddCurvesPopup == null)
            {
                s_AddCurvesPopup = ScriptableObject.CreateInstance <AddCurvesPopup>();
            }
            s_State = state;
            s_AddCurvesPopup.Init(buttonRect);
            return(true);
        }
Exemplo n.º 2
0
        internal static bool ShowAtPosition(Rect buttonRect, IAnimationRecordingState state, OnNewCurveAdded newCurveCallback)
        {
            long num = DateTime.Now.Ticks / 0x2710L;

            if (num >= (s_LastClosedTime + 50L))
            {
                Event.current.Use();
                if (s_AddCurvesPopup == null)
                {
                    s_AddCurvesPopup = ScriptableObject.CreateInstance <AddCurvesPopup>();
                }
                NewCurveAddedCallback = newCurveCallback;
                s_State = state;
                s_AddCurvesPopup.Init(buttonRect);
                return(true);
            }
            return(false);
        }
        internal static bool ShowAtPosition(Rect buttonRect, AnimationWindowState state, OnNewCurveAdded newCurveCallback)
        {
            // We could not use realtimeSinceStartUp since it is set to 0 when entering/exitting playmode, we assume an increasing time when comparing time.
            long nowMilliSeconds = System.DateTime.Now.Ticks / System.TimeSpan.TicksPerMillisecond;
            bool justClosed      = nowMilliSeconds < s_LastClosedTime + 50;

            if (!justClosed)
            {
                Event.current.Use();
                if (s_AddCurvesPopup == null)
                {
                    s_AddCurvesPopup = ScriptableObject.CreateInstance <AddCurvesPopup>();
                }

                NewCurveAddedCallback = newCurveCallback;
                s_State = state;
                s_AddCurvesPopup.Init(buttonRect);
                return(true);
            }
            return(false);
        }