Skip to content

MenuArt

Namespace Nfty.Ticket in assembly Nfty.Ticket.

public record MenuArt

How a Menu carries its art.

Constructors

MenuArt(MenuArtMode, int, int, IReadOnlyList<MenuCell>)

public MenuArt(MenuArtMode Mode, int AtlasWidth, int AtlasHeight, IReadOnlyList<MenuCell> Cells);

Parameters

  • Mode (MenuArtMode) - Atlas or loose.
  • AtlasWidth (int) - The atlas PNG's width; zero in loose mode.
  • AtlasHeight (int) - The atlas PNG's height; zero in loose mode.
  • Cells (IReadOnlyList<MenuCell>) - One entry per distinct image. In loose mode the rects are the whole image, so a reader can treat both modes with one code path.

Properties

AtlasHeight

public int AtlasHeight { get; init; }

The atlas PNG's height; zero in loose mode.

AtlasWidth

public int AtlasWidth { get; init; }

The atlas PNG's width; zero in loose mode.

Cells

public IReadOnlyList<MenuCell> Cells { get; init; }

One entry per distinct image. In loose mode the rects are the whole image, so a reader can treat both modes with one code path.

Mode

public MenuArtMode Mode { get; init; }

Atlas or loose.