Swiping on GUI layer.... can it be done?
by Jereis Zaatri · in iTorque 2D · 06/26/2010 (11:36 pm) · 15 replies
Hello,
I'm creating a gui that looks similar to the iphone main screen. I'm aware that the gui elements above can interfere with call backs of the elements underneath, so is it possible to have the swipe action of the iphone menue screen?
I'm creating a gui that looks similar to the iphone main screen. I'm aware that the gui elements above can interfere with call backs of the elements underneath, so is it possible to have the swipe action of the iphone menue screen?
#2
function oniPhoneTouchMove( %touchCount, %touchX, %touchY )
{
echo(%touchCount SPC %touchX SPC %touchY SPC "+_+_+_+__+_+__+_+_+_");
}
is not working in game.cs.
06/28/2010 (10:09 am)
Is there something I need to enable for that to work because:function oniPhoneTouchMove( %touchCount, %touchX, %touchY )
{
echo(%touchCount SPC %touchX SPC %touchY SPC "+_+_+_+__+_+__+_+_+_");
}
is not working in game.cs.
#3
06/28/2010 (10:36 am)
Do you need to enable multitouch in commonConfig.xml ?<MultiTouch>2</MultiTouch>
#4
06/28/2010 (11:20 am)
That didn't work either.
#5
06/29/2010 (8:16 am)
That should work - Have you checked the 'multitouch support' box in the editor in the project tab?
#6
06/29/2010 (8:26 am)
Actually what I posted was wrong - that should be a "1" not a "2", no idea where the "2" came from<MultiTouch>1</MultiTouch>
#7
<iDeviceSettings>
<iDeviceType>0</iDeviceType>
<iDeviceScreenOrientation>0</iDeviceScreenOrientation>
<iDeviceScreenResolution>1</iDeviceScreenResolution>
<iFeatureUseStoreKit>0</iFeatureUseStoreKit>
<iFeatureUseNetwork>0</iFeatureUseNetwork>
<iFeatureUseGameKit>0</iFeatureUseGameKit>
<iFeatureUseMusic>1</iFeatureUseMusic>
<iFeatureUseLocation>0</iFeatureUseLocation>
<iFeatureUseMultitouch>1</iFeatureUseMultitouch>
<iFeatureUseMoviePlayer />
<iFeatureUseAutoRotate />
<iFeatureUseOrientation />
<iFeatureStatusBarType>0</iFeatureStatusBarType>
<MultiTouch>1</MultiTouch>
</iDeviceSettings>
06/29/2010 (4:42 pm)
still not working...<iDeviceSettings>
<iDeviceType>0</iDeviceType>
<iDeviceScreenOrientation>0</iDeviceScreenOrientation>
<iDeviceScreenResolution>1</iDeviceScreenResolution>
<iFeatureUseStoreKit>0</iFeatureUseStoreKit>
<iFeatureUseNetwork>0</iFeatureUseNetwork>
<iFeatureUseGameKit>0</iFeatureUseGameKit>
<iFeatureUseMusic>1</iFeatureUseMusic>
<iFeatureUseLocation>0</iFeatureUseLocation>
<iFeatureUseMultitouch>1</iFeatureUseMultitouch>
<iFeatureUseMoviePlayer />
<iFeatureUseAutoRotate />
<iFeatureUseOrientation />
<iFeatureStatusBarType>0</iFeatureStatusBarType>
<MultiTouch>1</MultiTouch>
</iDeviceSettings>
#8
06/29/2010 (4:48 pm)
It looks like those settings changed between 1.3 and 1.4 - I'm not on 1.4 yet. I'd remove that line I posted from your config file as you appear to be on 1.4.
#9
06/29/2010 (5:37 pm)
hmmmmm.... any way I can take an event and then pass it down? So if I have button A cover button B, I can take the callback of A and pass it down without directly making the callback of B.
#10
06/29/2010 (8:58 pm)
I think there are some changes between versions 1.3 and 1.4 that affect the touch functions, such as oniPhoneTouchMove() for example. I'm still using 1.3 so I can't test this, but feedback from others about my Breakout tutorial code (which I developed using 1.3.1) seems to suggest this is the case. I use oniPhoneTouchMove() to control the base paddle, and when the game is run in 1.4, the paddle apparenely does not work (that is what I heard anyway, but I haven't tested it). So there seems to be some differences between the versions that affect touch events.
#11
At this point, 1.4 is unreliable, and since it is different to previous versions, and not completely backwards compatible, this makes a lot of the previous solutions in the forums obsolute. The fact that my breakout tutorial port does not run in 1.4 is evidence to that.
I would highly recommend staying with 1.3. Let GG test their own beta versions!
06/29/2010 (9:04 pm)
Jereis, are you using version 1.4 beta? I forgot to ask that, and just assumed it based on the other comments in this thread. If you are using 1.4, I would recommend trying 1.3. The latest version 1.4 is still in beta, and bug ridden, and any new comer should not be using beta software in my opinion. At this point, 1.4 is unreliable, and since it is different to previous versions, and not completely backwards compatible, this makes a lot of the previous solutions in the forums obsolute. The fact that my breakout tutorial port does not run in 1.4 is evidence to that.
I would highly recommend staying with 1.3. Let GG test their own beta versions!
#12
06/29/2010 (9:10 pm)
Well my experience with 1.3 hasn't been that great either. At least with 1.4 it didn't freeze my entire computer. So my idea to send the event to the lower levels wouldn't work either?
#13
07/01/2010 (1:27 am)
Jereis - you are testing this on the hardware and not on the Mac right? Touch commands only work on the hardware.
#14
07/01/2010 (7:52 am)
Oh..... -_- How am I supposed to test it now?
#15
07/01/2010 (4:30 pm)
start xcode and at least build to simulator. optimally build to device naturally so you see the real performance etc
Conor O'Kane
cokane.com