Files
BookRPG/Library/PackageCache/com.unity.collab-proxy@0b1559bcd34e/Editor/Views/Properties/CommentTextArea.cs
2026-07-16 21:49:59 +01:00

33 lines
906 B
C#

using System;
using Unity.PlasticSCM.Editor.UI.UndoRedo;
using UnityEditor;
using UnityEngine;
#if !UNITY_6000_3_OR_NEWER
using EditorGUI = Unity.PlasticSCM.Editor.UnityInternals.UnityEditor.EditorGUI;
#endif
namespace Unity.PlasticSCM.Editor.Views.Properties
{
class CommentTextArea : UndoRedoTextArea
{
internal CommentTextArea(Action repaint)
: base(repaint, string.Empty) { }
internal void OnGUI(float height)
{
Rect position = GUILayoutUtility.GetRect(
GUIContent.none,
EditorStyles.textArea,
GUILayout.Height(height),
GUILayout.ExpandWidth(true));
OnGUIInternal(
() => EditorGUI.ScrollableTextAreaInternal(position, mText, ref mScrollPosition, EditorStyles.textArea),
() => { });
}
Vector2 mScrollPosition;
}
}