Editor/Roof/ArchRoofSheets.cs
namespace Sunless.Architecture;
public sealed class ArchRoofSheet : IArchSheet {
public Type Payload => typeof( ArchRoofPart );
public void Build( ToolSidebarWidget panel, ArchTool tool, ArchSelection picked, Action refresh, Action changed ) {
if ( picked.Item is not ArchRoofPart roof ) {
return;
}
ArchRoofUi.Build( panel, roof, tool?.Kit, refresh, changed, tool );
ArchRoofUi.Ridge( panel, roof, changed );
ArchRoofUi.Details( panel, roof, changed );
}
}
public sealed class ArchRoofLightSheet : IArchSheet {
public Type Payload => typeof( ArchRoofLightPart );
public void Build( ToolSidebarWidget panel, ArchTool tool, ArchSelection picked, Action refresh, Action changed ) {
if ( picked.Item is ArchRoofLightPart light ) {
ArchRoofUi.Light( panel, light, tool.Kit, refresh, changed );
}
}
}