mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-22 13:19:33 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
34 lines
855 B
C#
34 lines
855 B
C#
namespace Sandbox;
|
|
|
|
/// <summary>
|
|
/// When added to a method - the inspector will show a button for it.
|
|
/// </summary>
|
|
[AttributeUsage( AttributeTargets.Method )]
|
|
public class ButtonAttribute : System.Attribute
|
|
{
|
|
public string Icon { get; set; }
|
|
public string Title { get; set; }
|
|
//public string Group { get; set; }
|
|
//public Color Color { get; set; } = Color.White;
|
|
|
|
public ButtonAttribute( string value = "", string icon = "" )
|
|
{
|
|
Title = value;
|
|
Icon = icon;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// When added to a property on a Component, we'll try to make that component value non null.
|
|
/// We will first look on the GameObject for the component type. If it's not found, we'll create one.
|
|
/// </summary>
|
|
[AttributeUsage( AttributeTargets.Property )]
|
|
public class RequireComponentAttribute : System.Attribute
|
|
{
|
|
public RequireComponentAttribute()
|
|
{
|
|
|
|
}
|
|
}
|