Nuklear
Nuklear copied to clipboard
Add example widget using an nk_image to the sdl_renderer demo
This PR is intended to help illustrate the creation of nk_image from SDL_Surface and SDL_Texture.
A nk_button_image_label has been added to the sdl_renderer demo which looks like this:
The icon is loaded from small bmp image that has been added to the example/icon directory, since SDL can only load bmp images without linking against something like SDL_Image.
Some things potentially worth considering:
- should the relative pathing to the bmp in
example/iconbe handled differently? - would it be better to eliminate the added image by instead using an existing png and linking against SDL_Image?
When I first started using Nuklear, an example like this would have been of great assistance to me.
Cheers! 😄