Advertisement

Is SDL2 the right tool for UI design?

Started by July 27, 2018 03:16 PM
2 comments, last by wintertime 6 years, 1 month ago

Hi there,

I'm currently working with SDL2 and have been able to successfully render textures to the screen. I've also been experimenting with the sound and event mechanisms in SDL2. 

I've recently  been thinking about other aspects of game design, specifically UI design. As I've stared envisioning my game, I see there is need to handle text input, button clicking, dropdown menus, and more. I've done some UI programming in other languages (Java, C# winforms, etc.) and have even done some in Qt. These libraries often feature all the standard UI elements. 

As of currently, I'm trying to figure out what SDL2's role should be in the end application. Should SDL2 only be used for game rendering, sound handling, and game inputs? And then would it make sense to use an external GUI library to handle all of the other standard UI features?

For those of you familiar with SDL2, what purpose do you believe it serves?

You can use SDL to render your UI elements and to get events relevant to you UI, the rest (UI logic) will have to be implemented by you (which is not difficult).

Using an external GUI library can save you time and effort.

Advertisement

There's a tutorial I also used some time ago about creating a simple GUI: http://iki.fi/sol/imgui/

Its pretty easy actually.

This topic is closed to new replies.

Advertisement