The situation I have, is that my App is made up of all GUITextures, that are layered on the z position.
Some of these GUITextures link to other game elements and react on touch events.
My question is, where do I start (search?) in order to find out how to tell the touch event that it will only activate when its assigned GUITexture is in a certain area (say middle) of the screen?
What I’m trying to do is avoid is where I will have two textures, each with its own unique event when touched. But if they are on top of each other, the incorrect event (eg the texture on the bottom) gets called on touch, rather than the top texture to which I’d want to assign a priority?
God I hope this all makes sense to someone
Thanks for any guidance. Please ask if you need further interpretation of the above. Its 1am and I’m not exactly thinking straight
You probably wouldn’t tell the touch event not to activate, but probably only have the GUIElement respond if it is at a certain layer and position.
So in the GUI script you would check did the user tap any where, yes, then you check if the this object is at a certain depth. If it is then check the position of the mouse and see it they overlap.
Or, you could just disable the scripts on your GUI when they are not visible. Then you don’t have to worry about the layer, and turn them back on when they become visible again.