Exemplo n.º 1
0
        private void OnGUI()
        {
            using (Horizontal.Do(EditorStyles.toolbar))
            {
                showStyles = GUILayout.Toggle(showStyles, "Styles", EditorStyles.toolbarButton);
                showStyles = !GUILayout.Toggle(!showStyles, "Icons", EditorStyles.toolbarButton);
            }

            if (showStyles)
            {
                EditorHelper.DrawAllStyles();
            }
            else
            {
                EditorHelper.DrawAllIcons();
            }
        }
Exemplo n.º 2
0
        private void OnGUI()
        {
            using (Horizontal.Do(EditorStyles.toolbar))
            {
                if (EditorHelper.DropDownButton("Drop Down Button", EditorStyles.toolbarDropDown))
                {
                    dropDownMenu.DropDown(EditorHelper.DropDownRect);
                }
                GUILayout.FlexibleSpace();
            }

            EditorGUILayout.LabelField("Selection Style", EditorHelper.Styles.Selection);
            EditorGUILayout.LabelField("PreDrop Style", EditorHelper.Styles.PreDrop);
            EditorGUILayout.LabelField("Plus Style", EditorHelper.Styles.Plus);
            EditorGUILayout.LabelField("Minus Style", EditorHelper.Styles.Minus);
            EditorGUILayout.LabelField("Warning Style", EditorHelper.Styles.Warning, GUILayout.Height(24.0f));

            using (LabelWidth.Do(256.0f))
            {
                EditorGUILayout.IntField("This is a 256 width label", 0);
            }

            EditorHelper.BeginBoxHeader();
            EditorGUILayout.LabelField("Awesome Box");
            EditorHelper.EndBoxHeaderBeginContent();

            EditorGUILayout.LabelField("Box contents...");

            Rect position = EditorHelper.Rect(4.0f);

            EditorGUI.DrawRect(position, Color.gray);

            GUI.tooltip = "This is a tooltip";
            EditorGUILayout.LabelField(EditorHelper.Label("This label has a tooltip"));

            EditorHelper.EndBox();

            searchText = EditorHelper.SearchField(searchText);
        }