Skip to content

Panel

public sealed class Panel

Namespace Hotline.Api

Fluent builder for a mod’s Hotline panel (returned by RegisterPanel). Everything is a safe no-op when the Hotline host is absent.

public string Id { get; }

The panel id (also the default log channel).

public Panel Text(Func<string> provider)

A free-text, multi-line readout in this panel.

public Panel Image(Func<int[]> provider)

An image in this panel (e.g. a QR code). Provider returns { width, height, argb… } or null.

public Panel Action(string label, Action run)

A clickable button (replaces a debug hotkey action).

public Panel Toggle(string label, Func<bool> get, Action<bool> set)

An on/off control (replaces a debug toggle hotkey).

public Panel Slider(
string label,
double min,
double max,
Func<double> get,
Action<double> set,
double step = 0d,
string unit = null)

A draggable value (replaces typing a number into a console to find it).

public Panel Hotkey(string label, HotlineKey key, Action run)

Bind a central hotkey to an action owned by this panel.

public Panel Log()

Show this panel’s own log channel inside the panel.

public void Write(string message, LogLevel level = LogLevel.Info)

Send a log line to this panel’s channel (and the combined timeline).