Example #1
0
            public bool OnGUI(List <T> list, GUIStyle style = null)
            {
                style = style ?? EditorStyles.miniButton;
                if (GUILayout.Button("Select", style))
                {
                    SelectWindow <T> .Show(list, ControlId);
                }
                if (SelectWindow <T> .CanPick(ControlId))
                {
                    t = SelectWindow <T> .GetPick();

                    return(true);
                }
                return(false);
            }
Example #2
0
        public override void OnGUI()
        {
            base.OnGUI();
            Title("ScriptField");
            v = GUILayout.BeginScrollView(v);
            OnGUIUtility.ScriptField("this Script", GetType());
            Title("EditorPrefsFoldoutGroup");
            if (OnGUIUtility.EditorPrefsFoldoutGroup("FoldoutGroup"))
            {
                GUILayout.Label("FoldoutContent");
                GUILayout.Label("FoldoutContent");
                GUILayout.Label("FoldoutContent");
            }
            Title("ObjectPopupWindow");
            if (GUILayout.Button("ObjectPopupWindow.Show"))
            {
                ObjectPopupWindow.Show(this);
            }
            Title("SelectWindow");
            if (GUILayout.Button("SelectWindow<T>.Show"))
            {
                SelectWindow <string> .Show(strlist, "1");
            }
            if (SelectWindow <string> .CanPick("1"))
            {
                var t = SelectWindow <string> .GetPick();

                Debug.Log(t);
            }
            Title("OnGUIUtility.Search");
            var s = search.OnToolbarGUI();

            Title("OnGUIUtility.Zone_Divide2Horizontal");
            zone_Horizon.OnGUILayout(window.Repaint, () =>
            {
                GUILayout.Button("1");
                GUILayout.Button("1");
                GUILayout.Button("1");
                GUILayout.Button("1");
                OnGUIUtility.Debug.HolderBox();
            },
                                     () =>
            {
                SubZone_Horizon.OnGUILayout(window.Repaint, () =>
                {
                    GUILayout.Button("2");
                    GUILayout.Button("2");
                    OnGUIUtility.Debug.HolderBox();
                    GUILayout.Button("2");
                    SubZOne_Vertical.OnGUILayout(window.Repaint, () =>
                    {
                        GUILayout.Button("3");
                        GUILayout.Button("3");
                        OnGUIUtility.Debug.HolderBox();
                        GUILayout.Button("3");
                    },
                                                 () =>
                    {
                        GUILayout.Button("3");
                        OnGUIUtility.Debug.HolderBox();
                        GUILayout.Button("3");
                    });
                },
                                            () =>
                {
                    GUILayout.Button("2");
                    OnGUIUtility.Debug.HolderBox();
                    GUILayout.Button("2");
                });
            });
            EditorGUILayout.MinMaxSlider("111", ref min, ref max, 0, 100);
            Title("SeanlibEditor.Styles");
            GUILayout.Button("SeanLibEditor.styles.Area", SeanLibEditor.styles.ExtendArea, GUILayout.Width(200));
            GUILayout.Button("SeanLibEditor.styles.Group", SeanLibEditor.styles.ExtendGroup, GUILayout.Width(200));
            GUILayout.Button("SeanLibEditor.styles.Title", SeanLibEditor.styles.Title, GUILayout.Width(200));
            GUILayout.EndScrollView();
            Title("GUIGifDrawer.OnGUI");
            gifDrawer.OnGUI(this.window.Repaint);
            gifDrawer1.OnGUI(this.window.Repaint);
        }