SDL3 Menu on Windows, Mac and Linux

Hi,

I’m making an application with SDL3 that has dropdown menus and I know they’re done differently on each platform. Is there a way to make it easier so I don’t need a different version of the application for each system?

Thanks

RC

1 Like

Hi :slight_smile:

SDL has no GUI functionality. You should write your own GUI framework or use an existing one. Depending on what you need, you can try “immediate” libraries (e.g., Imgui) or retained (e.g., GitHub - mozeal/SDL_gui: GUI library for SDL2, but I have never used this one before). Try to google and pick the most suitable for you.

SDL2 has no GUI functionality, but SDL3 has a little.

:slight_smile: then we can say that SDL2 also has some GUI (show message box). But I guess here OP needs a little different UI capabilities..

I was looking into the same issue a few days ago. There’s actually work being done on adding cross-platform menu support to SDL 3:

I also found this library as a potential stop-gap for now but I haven’t tried it yet:

Hello,

I have written the cross-platform C GUI library Geeonx for Linux and Windows. It offers dropdown menus, pop-up menus, windows, a GUI creator and more. It is ready for use for SDL2 and I am nearly finished with the adaption to SDL3. I will speed up development if needed.

Kind regards,

Nik