TL;DR:
https://github.com/shtgames/GUI-libI've spent the better part of the last three months working on a GUI library based on SFML.
I'm sure you're already rolling your eyes thinking:
"Come on, another one of these?"Well, I've been looking high and low and I haven't found
one of those that's as practical and easy-to-use as what I wanted.
The whole design idea behind it is to create and define the interface with all the moving parts at the start of the program, setting textures, positions, colours, fonts, as well as, and here's the more important bit, setting the way in which every element should update itself and interact, if at all.
You'd then be able to have a clean, minimalistic main program loop that's nothing more than giving events to the GUI objects and drawing them, everything else is handled automatically the way you've defined it.
So, for instance, you'd give a TextArea an update function which returns the new string it should display, and it'll call that function and update itself often enough for humans to be incapable of seeing any lag.
You'd give a Button a void() function to call when an event specific to buttons; this would most often be, of course, telling it what to do upon being Released.
You can even set
HoverMessages on most things, so that they display when the mouse enters the given object. After a certain delay, if you so desire, and naturally with optional and tweakable fade-in and fade-out animations.
Not only that, but you can even set individual parts of the text you'd give the HoverMessage to be with different colors or styles, as well as to update themselves independently of the rest of the text you've given.
All of the Buttons, ProgressBars, TextAreas etc. can be used as free-floating objects or, preferably, as parts of Windows which, in turn, can be stored in WindowManagers.
There's quite a lot more that I haven't covered, so please check it out and tell me what you think; you can find the library, compiled only on VS2015 for the moment, along with example code and accompanying resources, as well as some screenshots:
https://github.com/shtgames/GUI-lib