Hello,
I've recently given up on using slick's gui components because there is way to much stuff I have to implement on my own.
So I'll give TWL a try...
My question is: How does event handling (e.g. button clicks) work in TWL?
I can pass a runnable to a button like this:
Code:
btn.addCallback(new Runnable() {
public void run() {
System.out.println("It works!");
}
});
Now, is run() executed in the same thread as the slick update method?
Or is it possible, that the button handler and update() run at the same time?
Can I safely write to the same variables from both the handler and update() ?