I've ran into an issue with
addImage(String spriteName)
in TooltipMakerAPI. Method works when I pass "graphics/icons/cargo/whatever.png" with vanilla icons, but when I try to do the same with images in my mod graphics folders it doesn't render the sprite. I've double-checked with a sprite that was already working as part of BaseIntelPlugin-inheritor class
public String getIcon() {
return Global.getSettings().getSpriteName("intel", "forge_production_report");
}
- it renders fine when appearing as campaign UI message icon (so game loads it), but fails to render via addImage in TooltipMakerAPI. Tinkered plenty with settings.json graphics categories and ids - nothing; another noticeable thing is that icons in vanilla cargo folders load alright, but all-white vanilla icons like those in graphics/ui/icons do not; so maybe there's some property of image files that needs to be adhered to.
Searched through forum, seems like people already had this issue pop up - not sure how it was resolved if was at all. My question is: how do I use addImage() properly to get it to render images? What properties the images should have? Searched also through various methods in API that concern sprites - not much luck with Javadocs.
Edit: resolved, problem was my own lack of attention when writing methods.