Dialogs / Messages with SDL?

Is there any library that I can use with the SDL to send notifications to the user? I am currently writing my output to stdout, but prefer to interact with the user via the sum sorting interface!

+4
source share
3 answers

There are several GUI libraries listed in the SDL site section.

For what it costs, I looked at all these libraries and decided that I did not need my needs. I write myself.

+1
source

Not quite, as far as I know, you pretty much should: 1) write your own using graphic primitives or 2) write a special OS code for each target platform to open a dialog box.

For the first option, you did not mention whether you use SDL for 2D graphics or OpenGL? If you use OpenGL, I believe that there are accessible GUI libraries that use OpenGL primitives to create GUI elements, I would try to find the โ€œOpenGL GUIโ€. If you look at how to render fonts with SDL_ttf and get them, you can write text responses to the display using this.

The second option requires you to explore how to open a message box on each platform that you want to target, and use #ifdefs to control which one is used. For example, if you want to target windows, OS X, and Linux, you will need to write 3 dialog box functions using api, Cocoa, and X11 windows.

0
source

I am the author of tiny file dialog boxes on sourceforge. This is a single C file consisting of just five function calls, including a message box and a question dialog. It does not have a main loop and does not complement the SDL.

0
source

All Articles