public static void StickyTitle(string text)
        {
            if (ABSAnimationInspector.styles.custom.stickyTitle == null)
            {
                ABSAnimationInspector.styles.custom.Init();
            }

            GUILayout.Label(text, ABSAnimationInspector.styles.custom.stickyTitle, new GUILayoutOption[0]);
            DeGUILayout.HorizontalDivider(new Color?(ABSAnimationInspector.colors.custom.stickyDivider), 2, 0, 0);
        }
Example #2
0
 public static void StickyTitle(string text)
 {
     //IL_0025: Unknown result type (might be due to invalid IL or missing references)
     GUILayout.Label(text, ABSAnimationInspector.styles.custom.stickyTitle);
     DeGUILayout.HorizontalDivider((Color?)DeSkinColor.op_Implicit(ABSAnimationInspector.colors.custom.stickyDivider), 2, 0, 0);
 }
Example #3
0
        // Returns FALSE if the help panel should be closed
        public bool Draw()
        {
            if (Event.current.type == EventType.KeyUp && Event.current.keyCode == KeyCode.F1)
            {
                Event.current.Use();
                return(false);
            }

            // Block and event until the first layout has happened
            if (!_layoutReady)
            {
                if (Event.current.type == EventType.Layout)
                {
                    _layoutReady = true;
                }
                else
                {
                    return(true);
                }
            }

            _Styles.Init();
            Matrix4x4 prevGuiMatrix = GUI.matrix;

            GUI.matrix = Matrix4x4.TRS(_process.position.min - _process.position.min / _process.guiScale, Quaternion.identity, Vector3.one);

            // Background (adapt area to counter GUI scale)
            Rect area = new Rect(
                _process.relativeArea.x, _process.relativeArea.y,
                _process.relativeArea.width * _process.guiScale, _process.relativeArea.height * _process.guiScale
                );

            using (new DeGUI.ColorScope(null, null, new Color(0.14f, 0.14f, 0.14f, 0.6f))) GUI.DrawTexture(area, DeStylePalette.whiteSquare);

            // Content
            GUILayout.BeginArea(area);
            _scroll = GUILayout.BeginScrollView(_scroll);
            GUILayout.Label("Help Panel", _Styles.titleLabel);
            DeGUILayout.HorizontalDivider(_EvidenceColor, 1, 0, 0);
            // Project notes
            if (notes.allowEditableNote || !string.IsNullOrEmpty(notes.note))
            {
                if (!string.IsNullOrEmpty(notes.note))
                {
                    GUILayout.Label(notes.note, _Styles.projectNotes);
                }
                if (notes.allowEditableNote)
                {
                    EditorGUI.BeginChangeCheck();
                    Rect r = GUILayoutUtility.GetRect(new GUIContent(notes.editableNote), _Styles.editableProjectNotes);
                    using (new DeGUI.CursorColorScope(Color.white)) {
                        notes.editableNote = EditorGUI.TextArea(r, notes.editableNote, _Styles.editableProjectNotes);
                    }
                    if (EditorGUI.EndChangeCheck())
                    {
                        Dispatch_OnEditableNoteChanged(notes.editableNote);
                    }
                }
            }
            // ContentGroups
            int descriptionWidth = (int)Mathf.Min(area.width * 0.6f, 350);

            foreach (ContentGroup contentGroup in _ContentGroups)
            {
                contentGroup.Parse();
                GUILayout.Label(contentGroup.title, _Styles.groupTitleLabel);
                if (!string.IsNullOrEmpty(contentGroup.description))
                {
                    using (new DeGUI.ColorScope(_DescriptionBGColor)) GUILayout.Label(contentGroup.description, _Styles.descriptionLabel);
                }
                for (int r = 0; r < contentGroup.definitions.Count; ++r)
                {
                    Definition definition = contentGroup.definitions[r];
                    using (new DeGUI.ColorScope(r % 2 == 0 ? _RowColor0 : _RowColor1)) GUILayout.BeginHorizontal(_Styles.rowBox);
                    if (string.IsNullOrEmpty(definition.keys))
                    {
                        GUILayout.Label(definition.definition, _Styles.definitionLabel);
                    }
                    else
                    {
                        GUILayout.Label(definition.definition, _Styles.definitionLabel, GUILayout.Width(descriptionWidth));
                        GUILayout.Label(definition.keys, _Styles.keysLabel);
                    }
                    GUILayout.EndHorizontal();
                }
            }
            GUILayout.EndScrollView();
            GUILayout.EndArea();

            GUI.matrix = prevGuiMatrix;
            return(true);
        }