Files
sbox-public/engine/Sandbox.System/Attributes/EnumButtonGroupAttribute.cs
Carson Kompon 106f1408dc Sprite Broadcast Message fixes (#4560)
- Added `[EnumDropdown]` attribute to force the dropdown for enums with less than 4 entries
- Added `[EnumDropdown]` to `Sprite.BroadcastEvent.Type` so the ControlWidget is a dropdown again like it used to be

https://files.facepunch.com/CarsonKompon/2026/April/17_15-37-YearlySnowleopard.mp4

- Having an unnamed broadcast event will no longer render the banner improperly on the FrameButton
2026-04-21 09:15:29 -04:00

20 lines
468 B
C#

namespace Sandbox;
/// <summary>
/// Forces an enum property to be shown as a group of buttons.
/// </summary>
[AttributeUsage( AttributeTargets.Property | AttributeTargets.Field )]
public class EnumButtonGroupAttribute : System.Attribute
{
}
/// <summary>
/// Forces an enum property to be shown as a dropdown list.
/// </summary>
[AttributeUsage( AttributeTargets.Property | AttributeTargets.Field )]
public class EnumDropdownAttribute : System.Attribute
{
}