Ejemplo n.º 1
0
        internal static void For(
            PendingChangesTab pendingChangesTab,
            float width,
            bool isOperationRunning)
        {
            using (new GuiEnabled(!isOperationRunning))
            {
                EditorGUILayout.BeginHorizontal();

                Rect textAreaRect = BuildTextAreaRect(
                    pendingChangesTab.CommentText,
                    width);

                EditorGUI.BeginChangeCheck();

                pendingChangesTab.CommentText = DoTextArea(
                    pendingChangesTab.CommentText ?? string.Empty,
                    pendingChangesTab.ForceToShowComment,
                    textAreaRect);

                pendingChangesTab.ForceToShowComment = false;

                if (EditorGUI.EndChangeCheck())
                {
                    OnTextAreaChanged(pendingChangesTab);
                }

                if (string.IsNullOrEmpty(pendingChangesTab.CommentText))
                {
                    DoPlaceholderIfNeeded(PlasticLocalization.GetString(
                                              PlasticLocalization.Name.CheckinComment),
                                          textAreaRect);
                }

                EditorGUILayout.EndHorizontal();
            }
        }
Ejemplo n.º 2
0
 static void OnTextAreaChanged(PendingChangesTab pendingChangesTab)
 {
     pendingChangesTab.ClearIsCommentWarningNeeded();
 }