Tooltips for Script Editor

This commit is contained in:
Simon Lübeß
2024-02-26 13:46:32 +01:00
parent aa29207e72
commit 19ee9bee89
2 changed files with 57 additions and 21 deletions
+23
View File
@@ -0,0 +1,23 @@
using System;
namespace GlitchyEngine.Editor;
/// <summary>
/// Specifies the tooltip text that will be shown when the name of the field is hovered in the editor.
/// </summary>
public sealed class TooltipAttribute : Attribute
{
/// <summary>
/// The tooltip text.
/// </summary>
public string Tooltip { get; private set; }
/// <summary>
/// Initializes a new instance of the <see cref="TooltipAttribute"/>.
/// </summary>
/// <param name="tooltip"><inheritdoc cref="Tooltip"/></param>
public TooltipAttribute(string tooltip)
{
Tooltip = tooltip;
}
}