Skip to content

ItemIcon

namespace Griff.Modules.Adventures;
public struct ItemIcon

An item’s picture on an InventoryBar: an image in Assets, the part of it to show, and its width over its height.

public float Aspect { get; init; }
public string Image { get; init; }
public Vector4 Source { get; init; }
public void Deconstruct(out string Image, out Vector4 Source, out float Aspect)
public override bool Equals(object obj)
public bool Equals(ItemIcon other)
public override int GetHashCode()
public static ItemIcon? Parse(string? text)

Reads “Sprites/key.png”, or a frame of a sprite sheet, “Sprites/items.png 4x2 5” (4 across, 2 down, frame 5); null for nothing.

public override string ToString()