Gio,
I put a new gui demo up in the projects area.
I wanted to do a small example of a gui which was non-blocking and worked with keyboard, mouse and multi-touch.
The little tank can move forward and turn left or right (w-a-d)
There is no boundary checking, so don't drive off the screen.
The keyboard works fine, as long as you run the project in full screen mode.
However, when I was trying to get the multi-touch to work, I came across a funny problem.
If you press one button and then a second one you sometimes get a mouse out event ?
So, I commented out the mouse out stuff and multi-touch works fine.
Now though, if you use the mouse, you can click a button and then drag the mouse off of that button, and the code still thinks
you are clicking the button (because I commented out the mouse out).
The way I have implemented it is an array that remembers which buttons are down.
When a button is down, its array value is set to true. When a button is up (or out ) its array value is set to false.
On update, if a buttons array value is true, then do that buttons action.
Anyway, I'm not sure why you would get a mouse out event if you had a finger down on one gui button and then pressed a second button ?
Or, is there a different way I should be doing the 'remembering' of which button is down in the update function.
If you can take a look, I'd appreciate it.
cheers,
Shri