retrieve an icon from the cache. returns the current skin's ICO_UNKNOWN if the icon image is not found in the cache and cannot be loaded from disk.
(IHasIcon ihi)
| 172 | * in the cache and cannot be loaded from disk. |
| 173 | */ |
| 174 | public FImage getIcon(IHasIcon ihi) { |
| 175 | String imageKey = ihi.getIconImageKey(); |
| 176 | final Texture icon; |
| 177 | if (missingIconKeys.get().contains(imageKey) || (icon = getImage(ihi.getIconImageKey(), false, true)) == null) { |
| 178 | missingIconKeys.get().add(imageKey); |
| 179 | return FSkinImage.UNKNOWN; |
| 180 | } |
| 181 | return new FTextureImage(icon); |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | * checks the card image exists from the disk. |
nothing calls this directly
no test coverage detected