Jump to content
  • Advertisement
Sign in to follow this  

kiss_sdl - Low level universal GUI widget toolkit for SDL2

This topic is 960 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is for announcements? It is not directly game related, they mostly use SDL for games, but it is an universal library. If you want to discuss it in some other place, please say. The main place to discuss it is the SDL development forum, this thread http://forums.libsdl.org/viewtopic.php?t=11772&sid=e7757c27c21438e8deceef94bddc7f63 . I think the people who use SDL, also read the SDL forum, but this is for these who may not read, or then it maybe may give a reason to start to use SDL.To not to forget to say that, KISS is an acronym, and a software development principle, with one of the woding "Keep it small and simple".


There were knowingly no widget toolkits for SDL2, that anyone could make to work, at least when reading the SDL forum. SDL2 is not compatible with SDL1. So i went ahead to write one. This is tested by people in the SDL development forum, and found to compile and work well.


This is a low level GUI toolkit. It is only 2295 lines of code, and only 1000 lines of code that actually implements the widgets and does all graphics. One should understand the differences between a low level widget toolkit and an advanced widget toolkit such as GTK, maybe reading that thread in the SDL forum helps to understand that. It is made to be easily changeable, and all the drawing functions and general functions are abstractied to different files, so by rewriting these functions one can use different libraries for drawing, fonts, etc. It implements a window, multiline label, button, select button, vertical scrollbar, horizontal scrollbar, progress bar, entry box, textbox, and a combo box. Yes it can implement overlapping dialog windows. But it is intended to be changed when there is not anything that does exactly what you want, by user added functionality or by rewriting the functions. This makes it universal. And this is why it is not just another widget toolkit.


There is a manual, i also wrote a hello world example in that SDL forum thread. This is a general low level widget toolkit, so when deciding to use it, you cannot go wrong. It takes a bit of effort to learn it, but this knowledge shall no way be wasted, for understanding whatever widget toolkit. But you don't have to learn a complex widget toolkit like GTK, when you just want to do the most common things with a graphical user interface.


kiss_sdl is in GitHub at the following link.




Screenshots of the two examples included in the library.





Edited by actsl

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!