Extra Resources in Designer not loading via GetBinaryResource
Posted: Sun Oct 13, 2019 2:08 pm
When I attempt to load an image (e.g. backgroundThing.png) that exists in "Extra Resources" via tge GetBinaryResource function, the value returned is a null reference. I have confirmed that the filename is an exact match. I note that the PNG file listed in Extra Resources has a type of "Image".
If I change all of the image filenames to have an underscore suffix (e.g. backgroundThing.png becomes backgroundThing.png_) and then add the file to Extra Resources, the type appears as Binary. Once I make this change, the GetBinaryResource call works perfectly (once I pass the '_' suffixed filename through).
This looks to be by design. However, I'd like to have images in my Extra Resources that I can use to draw to a canvas for use in the module. Is there a preferred way to load these that doesn't require me to mangle the filename?
If I change all of the image filenames to have an underscore suffix (e.g. backgroundThing.png becomes backgroundThing.png_) and then add the file to Extra Resources, the type appears as Binary. Once I make this change, the GetBinaryResource call works perfectly (once I pass the '_' suffixed filename through).
This looks to be by design. However, I'd like to have images in my Extra Resources that I can use to draw to a canvas for use in the module. Is there a preferred way to load these that doesn't require me to mangle the filename?