UI/OptionsScreen.razor

A Blazor-style UI component (Razor) for the options screen. It renders a root panel whose opacity is driven by Stage.FadeAlpha and hosts an OptionsPanel, passing the Stage's Controller. It short-circuits if Stage is null and provides a BuildHash based on FadeAlpha for change detection.

@using Sandbox
@using Sandbox.UI
@inherits PanelComponent
@namespace BlockParty
@attribute [StyleSheet( "OptionsScreen.razor.scss" )]

@* Main-menu options screen. Thin view over OptionsStage: fades the whole UI in/out (FadeAlpha)
   and hosts the shared OptionsPanel block. Navigation/state lives in the stage's controller. *@
<root style="opacity: @(Stage?.FadeAlpha ?? 0f)">
	@{ if ( Stage is null ) return; }
	<OptionsPanel [email protected]></OptionsPanel>
</root>

@code
{
	public OptionsStage Stage { get; set; }

	protected override int BuildHash() => System.HashCode.Combine(
		(int)((Stage?.FadeAlpha ?? 0f) * 20f) );
}