Skip to content

ToolHud

namespace Griff.Modules.Contraptions;
public sealed class ToolHud

Where the SandboxTools’ HUD goes for a view: the tools along the top with the spawn list under them, and the list of an entity’s inputs or outputs the Wire tool pops up. Sized from the view’s height, so it looks the same at any zoom.

public float Gap { get; }
public float ToolHeight { get; }
public float Unit { get; }

A hundredth of the view’s height: the HUD’s unit of size.

public HudRect View { get; }
public HudRect PortRow(Vector2 at, int index)

A row of the list of an entity’s inputs or outputs, popped up beside at.

public HudRect PropButton(int index, int count)

A prop’s button in the spawn list, under the tools.

public HudRect ToolButton(int index, int count)

A tool’s button, centered along the top.

public const string Port

What an input’s or output’s HudButton in the Wire tool’s list is (its Kind).

public const string Prop

What a prop’s HudButton in the spawn list is (its Kind).

public const string Tool

What a tool’s HudButton is (its Kind).