Editor/Wall/ArchWallFormsRole.cs
using System;
namespace Sunless.Architecture;
public sealed class ArchWallFormsRole : IArchWallForms {
public void Wall( ToolSidebarWidget panel, ArchKit kit, IArchWallTreatment wall, Action refresh, Action changed, bool sizes, bool openings )
=> ArchWallUi.Build( panel, kit, wall, refresh, changed, sizes, openings );
public void ModKinds( ToolSidebarWidget panel, ArchWallMod chosen, Action<ArchWallMod> adopt )
=> ArchWallModUi.Kinds( panel, chosen, adopt );
public void ModSides( ToolSidebarWidget panel, ArchWallSide chosen, bool drafting, Action<ArchWallSide> adopt )
=> ArchWallModUi.Sides( panel, chosen, drafting, adopt );
public void ModSizes( ToolSidebarWidget panel, ArchWallModPart modifier, Action changed, bool station )
=> ArchWallModUi.Sizes( panel, modifier, changed, station );
public void ModFill( ToolSidebarWidget panel, ArchWallModPart modifier, Action changed )
=> ArchWallModUi.Fill( panel, modifier, changed );
}
public sealed class ArchWallSheet : IArchSheet {
public Type Payload => typeof( ArchWall );
public void Build( ToolSidebarWidget panel, ArchTool tool, ArchSelection picked, Action refresh, Action changed ) {
if ( picked.Item is ArchWall wall ) {
ArchWallUi.Build( panel, tool.Kit, wall, refresh, changed );
}
}
}
public sealed class ArchWallModSheet : IArchSheet {
public Type Payload => typeof( ArchWallModPart );
public void Build( ToolSidebarWidget panel, ArchTool tool, ArchSelection picked, Action refresh, Action changed ) {
if ( picked.Item is ArchWallModPart modifier ) {
ArchWallModUi.Build( panel, modifier, refresh, changed );
}
}
}