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

IMenuComponentRenderContext

Interface
Namespace: SwiftlyS2.Shared.Menu · Assembly: SwiftlyS2.CS2.dll
public interface IMenuComponentRenderContext

Everything a component needs to draw itself for one player.

View source

Properties

Component

The component being drawn.

IMenuComponent Component { get; }
Property Value

IsEnabled

Whether this component is interactive for this player right now.

bool IsEnabled { get; }
Property Value

IsFocused

Whether this component currently holds the selection.

bool IsFocused { get; }
Property Value

Menu

The menu being drawn.

IMenu Menu { get; }
Property Value

Player

The player the menu is being drawn for.

IPlayer Player { get; }
Property Value

RendererId

The id of the renderer that will consume the produced nodes.

string RendererId { get; }
Property Value

Provided so a component can attach a MenuRawNode aimed at a renderer it knows about. Components must still return usable nodes when they do not recognise the id.

Session

The session being drawn.

IMenuSession Session { get; }
Property Value