示例#1
0
        void RenderBottom()
        {
            GUI.BeginGroup(EditorContexts.mIns.GuiContext.ToolbarRect);
            //var style = "miniButton";

            var md = AssetBundleEditorHelper.GetMainMode(EditorContexts.mIns.Mode);

            var lw = EditorGUIUtility.labelWidth;
            var lt = EditorGUI.indentLevel;

            EditorGUIUtility.labelWidth = 80;
            EditorGUI.indentLevel       = 0;
            var newmd = (AssetWindow.WindowMode)EditorGUI.EnumPopup(new Rect(0, 0, 180, EditorGuiContext.GuiHeight), new GUIContent("Select Mode"), md);

            EditorGUIUtility.labelWidth = lw;
            EditorGUI.indentLevel       = lt;

            newmd = AssetBundleEditorHelper.GetMainMode(newmd);
            if (newmd != md)
            {
                EditorContexts.mIns.Mode = newmd;
            }

            GUI.EndGroup();
        }
        void RenderBotToolbar()
        {
            GUI.BeginGroup(EditorContexts.mIns.GuiContext.SpriteBotBarRect);

            var style = "miniButton";

            var md = AssetBundleEditorHelper.GetMainMode(EditorContexts.mIns.Mode);
            var lw = EditorGUIUtility.labelWidth;
            var lt = EditorGUI.indentLevel;

            EditorGUIUtility.labelWidth = 80;
            EditorGUI.indentLevel       = 0;
            var newmd = (AssetWindow.WindowMode)EditorGUI.EnumPopup(new Rect(0, 0, 180, EditorGuiContext.GuiHeight), new GUIContent("Select Mode"), md);

            EditorGUIUtility.labelWidth = lw;
            EditorGUI.indentLevel       = lt;

            newmd = AssetBundleEditorHelper.GetMainMode(newmd);
            if (newmd != md)
            {
                EditorContexts.mIns.Mode = newmd;
            }

            if (GUI.Button(new Rect(190, 0, 80, EditorGuiContext.GuiHeight), "Expand All", style))
            {
                _treeView.ExpandAll();
            }

            if (GUI.Button(new Rect(280, 0, 80, EditorGuiContext.GuiHeight), "Collapse All", style))
            {
                _treeView.CollapseAll();
            }

            if (GUI.Button(new Rect(380, 0, 80, EditorGuiContext.GuiHeight), "Refresh", style))
            {
                EditorContexts.mIns.ForceModeChange(AssetWindow.WindowMode.ToolsSprite);
            }

            if (EditorContexts.mIns.GuiContext.UsablePaths != null && EditorContexts.mIns.GuiContext.UsablePaths.Count > 0)
            {
                if (GUI.Button(new Rect(500, 0, 100, EditorGuiContext.GuiHeight), "Select Path"))
                {
                    GenericMenu menu = EditorContexts.mIns.GuiContext.Menu;
                    if (menu != null)
                    {
                        EditorContexts.mIns.GuiContext.Menu.ShowAsContext();
                    }
                }
            }


            GUI.EndGroup();
        }
示例#3
0
        void RenderBottom()
        {
            GUI.BeginGroup(EditorContexts.mIns.GuiContext.ToolbarRect);
            var style = "miniButton";

            var md = AssetBundleEditorHelper.GetMainMode(EditorContexts.mIns.Mode);
            var lw = EditorGUIUtility.labelWidth;
            var lt = EditorGUI.indentLevel;

            EditorGUIUtility.labelWidth = 80;
            EditorGUI.indentLevel       = 0;
            var newmd = (AssetWindow.WindowMode)EditorGUI.EnumPopup(new Rect(0, 0, 180, EditorGuiContext.GuiHeight), new GUIContent("Select Mode"), md);

            EditorGUIUtility.labelWidth = lw;
            EditorGUI.indentLevel       = lt;

            newmd = AssetBundleEditorHelper.GetMainMode(newmd);
            if (newmd != md)
            {
                EditorContexts.mIns.Mode = newmd;
            }

            if (GUI.Button(new Rect(190, 0, 80, EditorGuiContext.GuiHeight), "Expand All", style))
            {
                _treeView.ExpandAll();
            }

            if (GUI.Button(new Rect(280, 0, 80, EditorGuiContext.GuiHeight), "Collapse All", style))
            {
                _treeView.CollapseAll();
            }

            if (GUI.Button(new Rect(370, 0, 80, EditorGuiContext.GuiHeight), "Reload", style))
            {
                EditorContexts.mIns.ForceModeChange(EditorContexts.mIns.Mode);
                if (_treeView == null)
                {
                    Init();
                    _treeView.Reload();
                }
            }

            //if (GUI.Button(new Rect(460, 0, 80, EditorGuiContext.GuiHeight), "ReInit", style))
            //{
            //    EditorContexts.mIns.ForceModeChange(EditorContexts.mIns.Mode,true);
            //}

            GUI.EndGroup();
        }