Setup() private méthode

private Setup ( string tooltip, Rect rect ) : void
tooltip string
rect Rect
Résultat void
Exemple #1
0
 public static void Show(string tooltip, Rect rect)
 {
     if (s_guiView == null)
     {
         s_guiView = ScriptableObject.CreateInstance <TooltipView>();
         s_guiView.m_tooltipContainer = ScriptableObject.CreateInstance <ContainerWindow>();
         s_guiView.m_tooltipContainer.m_DontSaveToLayout = true;
         s_guiView.m_tooltipContainer.mainView           = s_guiView;
         s_guiView.m_tooltipContainer.SetMinMaxSizes(new Vector2(10f, 10f), new Vector2(2000f, 2000f));
     }
     if ((s_guiView.m_tooltip.text != tooltip) || (rect != s_guiView.m_hoverRect))
     {
         s_guiView.Setup(tooltip, rect);
     }
 }
Exemple #2
0
        public static void Show(string tooltip, Rect rect)
        {
            if (s_guiView == null)
            {
                s_guiView = ScriptableObject.CreateInstance <TooltipView>();
            }

            if (s_guiView.window == null)
            {
                var newWindow = ScriptableObject.CreateInstance <ContainerWindow>();
                newWindow.m_DontSaveToLayout = true;
                newWindow.rootView           = s_guiView;
                newWindow.SetMinMaxSizes(new Vector2(10.0f, 10.0f), new Vector2(2000.0f, 2000.0f));
                s_guiView.SetWindow(newWindow);
            }

            if (s_guiView.m_tooltip.text == tooltip && rect == s_guiView.m_hoverRect)
            {
                return;
            }

            s_guiView.Setup(tooltip, rect);
        }