swiftlys2/docs/api/ai/
API Reference › Menu.Components

DividerComponent

Class
Namespace: SwiftlyS2.Shared.Menu.Components · Assembly: SwiftlyS2.CS2.dll
public class DividerComponent : MenuComponentBase, IMenuComponent

A non-interactive horizontal rule, drawn from repeated ─ characters.

View source

Constructors

DividerComponent(int, string?, string?)

Creates a divider.

public DividerComponent(int length = 26, string? color = "#FFFFFF", string? id = null)
Parameters
  • lengthintoptionalHow many ─ characters to draw. Values below one are treated as one.
  • colorstring?optionalThe colour of the line, or null to inherit.
  • idstring?optionalA stable id, or null to generate one.

Properties

Color

The colour of the line, or null to inherit the renderer's default text colour.

public string? Color { get; set; }
Property Value

Length

How many ─ characters this divider draws. Never less than one.

public int Length { get; set; }
Property Value

Methods

Render(IMenuComponentRenderContext)

Produces this component's renderer-agnostic output.

public override MenuNode Render(IMenuComponentRenderContext context)
Parameters
Returns
The nodes describing this component.