Beispiel #1
0
        private void RenderRowTitle(Rect rect, string rowTitle, bool isActive, ProfileGroupDefinition groupDefinition)
        {
            GUILayout.Space(LEFT_INSET);
            m_GroupTitleStyle.fontStyle = isActive ? FontStyle.Bold : FontStyle.Normal;

            const float labelHeight = 18;
            Rect        labelRect   = new Rect(
                5, rect.y + ((rect.height - labelHeight) / 2.0f), NAME_COLUMN_WIDTH, labelHeight);

            EditorGUI.LabelField(labelRect, new GUIContent(rowTitle, groupDefinition.tooltip), m_GroupTitleStyle);

            // Render buttons over the active row.
            if (isActive)
            {
                if (RenderGroupButton(rect, 1, "AddIcon", "Add a keyframe at the current cursor position."))
                {
                    DidClickAddNewKeyframe(m_ActiveTimeController);
                }

                if (RenderGroupButton(rect, 0, "HelpIcon", "Show help information about this group property."))
                {
                    GroupHelpWindow.SetHelpItem(m_ActiveSkyProfile, groupDefinition.propertyKey, true);
                }
            }

            // Draw a divider between rows.
            float dividerYPosition = rect.y + rect.height + (ROW_PADDING / 2.0f) - HORIZONTAL_DIVIDER_HEIGHT;

            RenderHorizontalDivider(new Rect(rect.x, dividerYPosition, rect.width, HORIZONTAL_DIVIDER_HEIGHT));
        }
 public static GroupHelpWindow SharedHelpWindow()
 {
     if (_instance == null)
     {
         _instance              = CreateInstance <GroupHelpWindow>();
         _instance.name         = "Sky Help";
         _instance.titleContent = new GUIContent("Sky Help");
     }
     return(_instance);
 }
Beispiel #3
0
 private void UpdateExternalWindowsWithActiveGroupSelection(string propertyKey)
 {
     GroupHelpWindow.SetHelpItem(m_ActiveSkyProfile, propertyKey, false);
 }