Gui Blocks Touch
by Andrew Deters · in iTorque 2D · 01/26/2012 (10:31 pm) · 10 replies
I am having issues with the touch not working on level elements in my game because the GUI is in the way. Is there any way for me to work around this. It happens regardless of weather there is a gui element in the path or not. Gui's and touch on my game are both very important to the way it works so I can't remove one or the other.
#2
01/27/2012 (7:56 am)
I dont know if it is a distinct scene graph. How can I check if it is, or how can i pass it through?
#3
Also if you use the gui editor its not real objects and thus couldn't reside in a scene graph even if you wanted them to do
Sounds more like you used the gui editor or did the same UI in code directly and set them to respond to click / touch in which case they will eat the input too.
if you don't want them to interact don't enable the interaction.
The alternative would be not use the gui builder and that gui but use real T2D Scene Objects which work like regular objects then, there are articles on that and the example projects widely work like this too as its much more flexible and iOS suited.
01/27/2012 (8:25 am)
You would have done it manually if it were 2 scene graphs :)Also if you use the gui editor its not real objects and thus couldn't reside in a scene graph even if you wanted them to do
Sounds more like you used the gui editor or did the same UI in code directly and set them to respond to click / touch in which case they will eat the input too.
if you don't want them to interact don't enable the interaction.
The alternative would be not use the gui builder and that gui but use real T2D Scene Objects which work like regular objects then, there are articles on that and the example projects widely work like this too as its much more flexible and iOS suited.
#4
01/27/2012 (8:28 am)
Well I did use the gui editor. So I guess that answered that question. What can I do now?
#5
01/28/2012 (2:26 pm)
Is there any way I can make the touch work on all layers of the game? Both the gui and level?
#6
01/29/2012 (8:52 am)
Is your sceneWindow in the gui file set to receive input? The way it works with interaction between the GUI system and the game is the SceneGraph is referenced in a SceneWindow which is defined in the gui file. SO you have to make sure your scene window is receiving input correctly so it gets sent to your scene objects. Then in the gui file you have to make sure no other fullscreen input eating gui objects are in front of your sceneWIndow otherwise itll never receive them. If you need a control that eats input to be fullscreen, you have to put it inside of a GUINoMouseCtrl.
#7
01/30/2012 (8:01 pm)
The controls scheme I use (which you can see here: www.garagegames.com/community/forums/viewthread/127943/1#comment-817046) allows for touches on any scenegraph. However it doesn't support the GUI system. I'd also recommend making your GUI with normal scene objects, in a second scenegraph for best functionality on iOS devices.
#8
02/01/2012 (1:22 pm)
I am sure that is a good idea to make the guis a 2nd scenegraph. But can I ask what is better about it? and is there a way to get variable text to display that way? I just need to know before I change everything.
#9
Profile = "GuiModelessDialogProfile";
02/17/2012 (12:43 pm)
Try making your gui non-modal. You can do this by editing your gui file to use a non-modal Profile, such as Profile = "GuiModelessDialogProfile";
#10
10/01/2012 (5:14 pm)
@Ben that worked perfectly. Thank you so much. sorry for the late reply, but I have been away from torque work for quite a while. But I am back now!!!!!!
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft