Use Icons
Use Icons

Goal
Render item/skill/status icons using the built‑in
<Icon>component, which reads the engine’s icon sheet and crops the correct region automatically.
What you’ll build
A small list that shows the current party leader’s equipped weapon/armor icons, and an arbitrary icon index example.
Import and show an icon by index
Show the leader’s equipment icons
Notes
<Icon>determines the icon sheet path viaplatform.gameInfo.getIconPath()and selects the correct sprite rectangle usingplatform.gameInfo.iconImageSize.getIconSprite(index).Control size with Tailwind classes (
w-6 h-6,w-8 h-8, etc.). The component preserves pixel‑perfect cropping by rendering through<ImageViewport>.You can use any valid icon index from database items/skills/states, e.g.,
$dataItems[ID].iconIndexinside UI code when that data is in scope.
See also
Last updated