I'm going to write the tutorials when I have more time. Currently all tasks are postponed to July.
There are different bind functions because you should be able to bind any kind of function.
If you just want a function to be called when something happens then it isn't hard.
void function() {}
button->bindCallback(function, tgui::Button::LeftMouseClicked); // Triggers can be combined with '|'
But if you want a function that is called for different objects (e.g. one callback function for every state in the game) then you'll need some information in the function to figure out who send the callback.
void function(const tgui::Callback& callback) { /* callback.callbackId == 3 */ }
button->setCallbackId(3);
button->bindCallbackEx(function, tgui::Button::LeftMousePressed);
But this only works for normal functions and not for member functions in classes.
I've already written in an
older post how to bind these functions.
The bigger problem is to find the available triggers as they are not yet documented.
You'll have to go through the include files (can be found in the
documentation).
But they are not listed in one place. For Button, look at ButtonCallbacks in Button.hpp, ClickableObjectCallbacks in ClickableObject.hpp and ObjectCallbacks in Object.hpp.
But don't despair, most objects follow the same inheritance and if you look at e.g. the ButtonCallbacks then you'll immediately see that it isn't hard to figure out where else to look.