Initial commit

This commit is contained in:
2026-03-03 00:39:30 +05:00
commit fc01f07d9b
29933 changed files with 5353098 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using UnityEditor;
using UnityEngine;
using PlasticGui;
namespace Unity.PlasticSCM.Editor.UI
{
internal static class DrawCopyableLabel
{
internal static void For(string label, GUIStyle style)
{
Rect rect = GUILayoutUtility.GetRect(
new GUIContent(label), style);
GUI.Label(rect, label, style);
if (Event.current.type != EventType.ContextClick)
return;
if (!rect.Contains(Event.current.mousePosition))
return;
GenericMenu menu = new GenericMenu();
menu.AddItem(
new GUIContent(PlasticLocalization.Name.Copy.GetString()),
false,
() => EditorGUIUtility.systemCopyBuffer = label);
menu.ShowAsContext();
Event.current.Use();
}
}
}