Skip to content

API reference Obsidian.API.Client.Screens

WidgetGroup class

Widgets drawn together: a screen's (see ModScreen).

public abstract class WidgetGroup

In Obsidian.API.Client.

Constructors

protected WidgetGroup();

Properties

Widgets

public IReadOnlyList<Widget> Widgets { get; }

The widgets, in the order they're drawn: later ones over earlier ones.

Methods

Add<TWidget>(TWidget)

public TWidget Add<TWidget>(TWidget widget) where TWidget : Widget;

Adds a widget, drawn over those added before it.

Returns

The widget, to keep for changing it later.

ClearWidgets()

public void ClearWidgets();

Removes every widget.

Remove(Widget)

public bool Remove(Widget widget);

Removes a widget.

Returns

Whether it was there.

On this page