Open jbliesener opened 1 month ago
Hello Jorg,
Thanks for the nice suggestion ! I need to review that a bit more thoroughly in the next days. Normally, there is almost no API for Hello ImGui: everything is done via parameters and callbacks.
If we want to follow this philosophy, it might fit better inside runner_callbacks. However, since this is a quite advanced case, I'm not sure it is worth being added in the user facing callbacks, and your solution might be enough.
Let me think of it for a few days.
This patch allows to redirect the LoadAssetFileData function, so that other resource load mechanisms can be implemented. Specifically, assets can be loaded from resource data embedded in the executable. These resources can be produced with any resource compiler, including, for example https://github.com/vector-of-bool/cmrc.
This allows to create single-file-executables in Windows and Linux with all required resources embedded in the executable.
An alternative asset load implementation could look like this:
I'm not sure about the Doxygen comments, you may want to check them.