Editor/Pillar/ArchPillarSheet.cs
namespace Sunless.Architecture;
public sealed class ArchPillarSheet : IArchSheet {
public Type Payload => typeof( ArchPillarPart );
public void Build( ToolSidebarWidget panel, ArchTool tool, ArchSelection picked, Action refresh, Action changed ) {
if ( picked.Item is not ArchPillarPart pillar ) {
return;
}
ArchPillarUi.Kinds( panel, tool.PillarTypes, pillar.Type,
type => {
tool.Picked = picked.Following( ArchPillarUi.Retype( tool, pillar, type ) );
refresh?.Invoke();
} );
ArchPillarUi.Sizes( panel, pillar, tool.FindPillarType( pillar.Type ), refresh, changed );
}
}