Skip to content

IHudLayout

namespace Griff.Runtime;
public interface IHudLayout

A system that shows buttons and the like on the screen (a hotbar, a tool picker).

public abstract IReadOnlyList<HudButton> HudButtons { get; }

The buttons the system shows on the screen this frame (a hotbar’s slots, a tool picker), with what each does.

public abstract void LayOutHud()

Called early in each frame’s Simulate phase to lay out what the system shows on this machine’s screen for the view as it is now (the host lays out another player’s for them in RunForPlayer), with its HudButtons, so whether the mouse is on it is known before anything acts on a click. Draw what it lays out through PinToView, so it keeps still on the screen as the camera is drawn moving between steps.