Code/Demos/RadialWheel/Components/WheelBlur.cs
using Goo;
using Sandbox.UI;

namespace Sandbox.RadialWheel;

// Full-wheel-size Container with BackdropFilterBlur, no background. Sits
// behind the wedges so the game world visible through translucent wedges
// is blurred. The blur clips to the circular border-radius.
public static class WheelBlur
{
    public static Container Build( float blurPx ) => new Container
    {
        Key                = "wheel-blur",
        Position           = PositionMode.Absolute,
        Top                = 0,
        Left               = 0,
        Width              = Length.Percent( 100 ),
        Height             = Length.Percent( 100 ),
        BackdropFilterBlur = blurPx,
        BorderTopLeftRadius     = Length.Percent( 50 ),
        BorderTopRightRadius    = Length.Percent( 50 ),
        BorderBottomLeftRadius  = Length.Percent( 50 ),
        BorderBottomRightRadius = Length.Percent( 50 ),
        PointerEvents      = PointerEvents.None,
    };
}