ToolHud
namespace Griff.Modules.Contraptions;
public sealed class ToolHudWhere 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.
Properties
Section titled “Properties”public float Gap { get; }ToolHeight
Section titled “ToolHeight”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; }Methods
Section titled “Methods”PortRow
Section titled “PortRow”public HudRect PortRow(Vector2 at, int index)A row of the list of an entity’s inputs or outputs, popped up beside at.
PropButton
Section titled “PropButton”public HudRect PropButton(int index, int count)A prop’s button in the spawn list, under the tools.
ToolButton
Section titled “ToolButton”public HudRect ToolButton(int index, int count)A tool’s button, centered along the top.
Fields
Section titled “Fields”public const string PortWhat an input’s or output’s HudButton in the Wire tool’s list is (its Kind).
public const string PropWhat a prop’s HudButton in the spawn list is (its Kind).
public const string ToolWhat a tool’s HudButton is (its Kind).