Nuklear icon indicating copy to clipboard operation
Nuklear copied to clipboard

Add example widget using an nk_image to the sdl_renderer demo

Open zoogies opened this issue 2 years ago • 0 comments

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:

Screenshot_20240221_143348

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/icon be 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! 😄

zoogies avatar Feb 21 '24 19:02 zoogies