Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Attn: Mod Devs - Displaying your own icons
Updated 2 weeks agoInvoking Icons
To show your own icons from your own mods it's very simple to use.
Inside your GetHoverText patch or Update loop use Unity's SendMessage function with a list of prefab names or icon sprites that you want to display as HoverIcons. This is not a hard dependency, it will not error if ZenHoverItem is not installed. It simply sends a message and ZenHoverItem listens for it if it's installed, otherwise nothing happens.
// yourData[] can be an array of:
// - Icons: Sprite[]
// - ItemPrefabNames: string[]
// - Tuples Style 1: (Sprite Icon, string Label)[]
// - Tuples Style 2: (string ItemPrefabName, string Label)[]
// NOTE: you can put null in an array Icon or ItemPrefabName to skip a position.
// You can not put null for the entire tuple.
// Anything beyond 5 elements will be ignored, it will not error if you go beyond the limit.
SendMessage("ZenDragon.ZenHoverItem::UpdateIcons", yourData[], SendMessageOptions.DontRequireReceiver);
NOTE: It will only display 5 icons max. Anymore than that and horizontal width is ugly. 4 is the ideal soft max. Best if you keep it 4 or under. However, 5 is there just in case. Generally a good idea to not clutter the UI.