Skip to content

StrategyHud

namespace Griff.Modules.Strategy;
public sealed class StrategyHud

Where everything on the strategy HUD goes for a view: the resources bar along the top, and along the bottom the minimap, what’s selected and the command card. Sized from the view’s height, so it looks the same at any zoom.

public float Button { get; }
public HudRect Card { get; }
public float Gap { get; }
public HudRect Info { get; }
public HudRect Minimap { get; }
public HudRect Panel { get; }
public HudRect TopBar { get; }
public float Unit { get; }

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

public HudRect View { get; }
public HudRect CardSlot(int index)

The command card’s button in a slot, counted along the top row first.

public bool Covers(Vector2 point)

True if point is on the HUD rather than the battlefield.

public Vector2 MinimapToWorld(Vector2 point)

The world point under a spot on the minimap.

public HudRect Tile(int index)

A small square for one of several selected things, in rows across the selection area.

public Vector2 WorldToMinimap(Vector2 world)

The spot on the minimap for a world point.

public const int CardColumns
public const int CardRows
public const int TileColumns
public const int TileRows