icon

abstract fun icon(name: String): Icon(source)

An icon this plugin declared by name in its manifest's "icons" (needs "api": 3); the package carries it as icons/<name>.png, and mibpkg installs it as icons/<id>/<sha16>.png (the first 16 hex digits of its SHA-256). An undeclared name throws IllegalArgumentException. Icons are static per installed package version: a new picture needs a new package. A declared icon that is not installed (the jar was pushed without installing its package) gives an inert icon: rows and items show without it, and the runtime logs one WARN. The icon is TINTED: icon(name) is icon(name, Icon.TINTED).

Since

api 3


abstract fun icon(name: String, colour: Int): Icon(source)

icon drawn either TINTED or in its OWN_COLOURS; any other colour throws IllegalArgumentException. Needs api 4. Status items honour it. Car rows ignore it: the drawer draws plugin row icons in their own colours, so ship a white glyph for the stock look. Its selected-row tint (the current screen's row, multiplied by the app colour) never applies to plugin rows on this HMI (observed on the bench, C2): a plugin page carries no drawer, so a plugin row is never the drawer's selected row.

Since

api 4