public void RefreshGuiInfo(EditorContexts contexts)
        {
            float wid    = contexts.GuiContext.WindowRect.width;
            float height = contexts.GuiContext.WindowRect.height;

            float usedheight = EditorGuiContext.GuiHeight;

            contexts.GuiContext.SpriteSearchRect = new Rect(0, usedheight, wid, EditorGuiContext.GuiHeight);

            usedheight += EditorGuiContext.GuiHeight;

            contexts.GuiContext.SpriteTreeRect = new Rect(0, usedheight, wid, Mathf.Max(100, height - usedheight - EditorGuiContext.GuiHeight));

            contexts.GuiContext.SpriteBotBarRect = new Rect(0, height - EditorGuiContext.GuiHeight, wid, EditorGuiContext.GuiHeight);
        }
Exemple #2
0
        public void RefreshGuiInfo(EditorContexts contexts)
        {
            contexts.GuiContext.SearchFieldRect = new Rect(5, EditorGuiContext.GuiHeight, contexts.GuiContext.WindowRect.width - 10, EditorGuiContext.GuiHeight);
            contexts.GuiContext.TreeViewRect    = new Rect(5, 2 * EditorGuiContext.GuiHeight, contexts.GuiContext.WindowRect.width - 10, contexts.GuiContext.WindowRect.height - 3 * EditorGuiContext.GuiHeight);

            if (contexts.Mode == AssetWindow.WindowMode.AssetDependency)
            {
                Rect  rect        = EditorContexts.mIns.GuiContext.WindowRect;
                float totalheight = rect.height - 3 * EditorGuiContext.GuiHeight;
                float halfheight  = Mathf.RoundToInt(totalheight / 2);

                EditorContexts.mIns.GuiContext.TreeViewRect   = new Rect(5, 2 * EditorGuiContext.GuiHeight, rect.width - 10, halfheight);
                EditorContexts.mIns.GuiContext.DependencyRect = new Rect(5, 2 * EditorGuiContext.GuiHeight + halfheight, rect.width - 10, halfheight);
            }
        }
Exemple #3
0
 public void RefreshGuiInfo(EditorContexts contexts)
 {
     contexts.GuiContext.SearchFieldRect = new Rect(5, EditorGuiContext.GuiHeight, contexts.GuiContext.WindowRect.width - 10, EditorGuiContext.GuiHeight);
     contexts.GuiContext.TreeViewRect    = new Rect(5, 2 * EditorGuiContext.GuiHeight, contexts.GuiContext.WindowRect.width - 10, contexts.GuiContext.WindowRect.height - 3 * EditorGuiContext.GuiHeight);
 }
Exemple #4
0
 public void RefreshGuiInfo(EditorContexts contexts)
 {
     contexts.GuiContext.PathRect      = new Rect(5, EditorGuiContext.GuiHeight + 10, contexts.GuiContext.WindowRect.width - 10, 4 * EditorGuiContext.GuiHeight);
     contexts.GuiContext.OptionRect    = new Rect(5, 15 + 5 * EditorGuiContext.GuiHeight, contexts.GuiContext.WindowRect.width - 10, 6 * EditorGuiContext.GuiHeight);
     contexts.GuiContext.BuildInfoRect = new Rect(5, contexts.GuiContext.OptionRect.yMax, contexts.GuiContext.WindowRect.width - 10, contexts.GuiContext.WindowRect.height - 14 * EditorGuiContext.GuiHeight);
 }