void OnGUI()
        {
            ReferenceUtil.DrawTopBar(this);
            ReferenceUtil.DrawSearchGlobal(SearchHandler);
            GUILayout.Space(10);


            //绘制左侧标签栏
            float _width  = 150;
            float _heigth = position.height - 10;

            EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.MaxWidth(_width),
                                          GUILayout.MinHeight(_heigth));

            tempLast      = selectedTabID;
            selectedTabID = GUILayout.SelectionGrid(selectedTabID, tabNames, 1);

            if (tempLast != selectedTabID)
            {
                FillMd(selectedTabID);
            }

            EditorGUILayout.EndVertical();


            DrawMd();
            //  Repaint();
        }
Exemple #2
0
        void OnEnable()
        {
            ReferenceUtil.Init();
            dicTexts = ResLoadUnlit.LoadTextAsset(FmdFloder, ".md");
            tabNames = new string[dicTexts.Count];
            dicTexts.Keys.CopyTo(tabNames, 0);

            selectedTabID = EditorPrefs.GetInt("ShaderRef_SeletedIndex_csv", 0);
            FillMDList(selectedTabID);
        }
        void OnEnable()
        {
            ReferenceUtil.Init();
            dicTexts = new Dictionary <string, string>();

            Skin = ResLoadUnlit.GetAssetInPackageByRelative <GUISkin>(SkinPath);

            dicTexts = ResLoadUnlit.LoadTextAsset(MdFloder, ".md");
            tabNames = new string[dicTexts.Count];
            dicTexts.Keys.CopyTo(tabNames, 0);

            selectedTabID = EditorPrefs.GetInt("ShaderRef_SeletedIndex_md", 0);
            FillMd(selectedTabID);
        }
Exemple #4
0
        private void DrawReference(List <FMDItem> infos)
        {
            if (infos != null)
            {
                scrollPos = GUILayout.BeginScrollView(scrollPos);
                foreach (var item in infos)
                {
                    ReferenceUtil.DrawOneContent(item);
                }

                GUILayout.Space(100);

                GUILayout.EndScrollView();
            }
        }