Пример #1
0
        public static void InitToolTip(Editor editor)
        {
            TooltipContentState state;

            if (!currentStateCache.TryGetValue(editor, out state))
            {
                state = new TooltipContentState();
                currentStateCache[editor] = state;
            }

            InitToolTip(state, editor);
        }
Пример #2
0
        public static void InitToolTip(SceneView sceneView)
        {
            TooltipContentState state;

            if (!currentStateCache.TryGetValue(sceneView, out state))
            {
                state = new TooltipContentState();
                currentStateCache[sceneView] = state;
            }

            InitToolTip(state, sceneView);
        }
Пример #3
0
        static void InitToolTip(TooltipContentState state, EditorWindow editorWindow)
        {
            currentState = state;
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }

            currentState.currentToolTip = null;
            currentState.drawnThisFrame = false;
            currentState.editorWindow   = editorWindow;
            currentState.editor         = null;

            currentState.maxArea = new Rect(0, 0, editorWindow.position.width, editorWindow.position.height);
        }
Пример #4
0
        static void InitToolTip(TooltipContentState state, Editor editor)
        {
            currentState = state;
            if (Event.current.type != EventType.Repaint &&
                Event.current.type != EventType.Layout)
            {
                return;
            }

            currentState.currentToolTip = null;
            currentState.drawnThisFrame = false;
            currentState.editorWindow   = null;
            currentState.editor         = editor;

            currentState.maxArea = new Rect(0, 0, EditorGUIUtility.currentViewWidth, Screen.height);
        }