WP7 - XNA to Silverlight navigation back Gesture issue - windows-phone-7.1

I am having total reverse issue. I have main screen set as Silverlight and from that, i go the XNA code which actually plays my game.
Now the issue is that first time when i navigate from SL to XNA, it works fine since my gestures are not set. Here I set my gestures. Now i navigate back to first screen (silverlight). From there i click
Play button again to open my xna code. Here it gives me TouchPanel.IsGestureAvailable == true by default which is causing issue to my game play.
I need to make sure that when user navigate from XNA to Silverlight, all gestures should be disabled so when user navigate again from SL to XNA... it works fine.
Can anyone please help me since i have been stuck from 2 days and not getting any solutions.
Thanks in advance.
Jacob

When navigating back from XNA find your last function working in XNA and in the end add
TouchPanel.EnabledGestures = GestureType.None;
This will disable TouchPanel in XNA recieving gestures. Next time you navigate to XNA, enable gestures you need.

I assume your creating SilverlightXNA project.
Have you tried setting this in overriden method onNavigetedFrom in your gamePage?

Related

How to debug Ionic iOS swipe gesture issues

I am dealing with a weird bug on Ionic's iOS native build where I sometimes cannot swipe back or switch tabs once I transition to a new page using router.navigateByURL(...), and trying to debug this issue has been troublesome since I can't "see" how the gestures are handled. Does anyone know where I should be looking in the code for handling transition gestures?
Here's a video demo of the problem: https://streamable.com/hk9c0
In the video, you can see me:
Swiping down to refresh using the ion-refresher element and you can see the page beneath (already entered a bug report for that part: https://github.com/ionic-team/ionic/issues/18284 )
Trying to tap the back arrow in the left corner
Attempting to swipe left to right to go back a page (hard to show that one)
Tapping the bottom tabs to transition to new tab, at one point, I tap on a tab that has an ion-fab element which appears in the bottom right because its z-index is higher than the "stuck" page.
Currently the best I've been able to do is by looking at the css classes that are added to the pages, but it's not much use....
Where app-release is the page you can see in the video and app-home is the page underneath the stack. It's my understanding that Ionic uses hammer.jsfor gestures, so I added it as a tag, please correct me if I am wrong. I cannot, for the life of me, recreate this bug consistently, but will often trigger 1 out of 50 tries.
I've been digging through the utils in Ionic Core to see where elements are being added and removed, with no luck.
I created a bug request for this here as well: https://github.com/ionic-team/ionic/issues/18305
Are you using #angular/animations to make the transitions between the pages? I had some issues like yours, as you can see in my question.
Router navigate on Ionic with animation blinking on ios using angular animations
If I am right about the use of #angualar/animations I suggest to use a custom animation of the Ionic itself, and not te angular's. You can see an working example here of its use here:
https://github.com/mhartington/ionic4-custom-animation
Since I have less tem 50 rep I cant comment so I had to post this anwser not knowing if it was really your case. Hope it helps.

Cordova iOS iPhone X - Home indicator - Edge protection - DeferringSystemGestures?

I'm working on a webapp built with Cordova for both iOS and Android. Everything was fine until I launched tests on the new Apple's iPhoneX. As you may know, Apple decided to remove the physical home button by replacing it by a home indicator at the bottom of the screen:
This home indicator is always visible on your screen and it goes over your webapp content. When user want to navigate between apps or to go back to the home screen, he has to swip up this home indicator (which is very sensitive). This wonderful invention brought to my webapp 2 main problems:
This break my webapp design because it goes over the content.
The system gesture enter in conflict with my webapp gesture. My entire gameplay is based on drag & drop and all draggable icon are at the bottom of the screen, under the home indicator.
1. How to hide the home indicator?
To solve the first point I found a plugin called cordova-plugin-hide-home-indicator. This will hide (with fadeIn/Out effect) the home indicator after a few second of inactivity. But every times a touchscreen event is detected, the home button is visible again... I have red here that even if the Objective C (Xcode) function prefersHomeIndicatorAutoHidden() (which I guess is used by this Cordova plugin) return true it doesn't mean that the home indicator will be hidden for ever. Well... if somebody has a better solution I would appreciate your help!
2. How to lock system gesture?
I found a Xcode function called preferredScreenEdgesDeferringSystemGestures() They explain that normally the system will always take precedence on an app gesture, but in some cases (for immersive games for exemple) you can ask for your app to take precedence on the system. This sounds great! But unfortunately I don't know anything of Objective C :) I didn't find any plugin about that point.
In this video from Apple at 10:33, they talk about edge protection, which should do the trick by giving the app gesture the precedence, but again, I didn't find any plugin for Cordova...
Any ideas? Thanks!
Don't hide the home indicator. The solution by Apple is to use the new CSS constants as padding for the safe areas of the device. Read this to get starting point: iPhone X support
You can use this plugin in order to avoid edge gestures at iOS
https://github.com/distinctdan/cordova-plugin-screen-edges
It's very easy to use, i used in a cordova project and it works as expected

Ogre3D+CEGUI Mouse position icon not cleared from screen

In our project we are developing an architecture based on plugins.
Each game is set up as a separate plugin and is responsible for establishing the right environment (SceneManager, SceneNodes, Entities, Lights, ...Cameras,..)
In our last game using a charger scenes, each scene is set up as a separate file (format .dotscene) with all resources defined graphics.
Within this videjuego CEGUI configure as GUI and this works flawlessly. But to go out and load another game we found CEGUI strange behavior .
The cursor position is updated fine but the icon above position is not clear screen, this causes it to accumulate on the screen
[Sceenshot 1] https://www.dropbox.com/s/6kuw0yat7r4s2as/ErrorCEGUI.png
Any idea of the cause and how to fix it?
Very thanks,
Miguel
Solved!
For some internal bugs we were creating additional cameras and CEGUI does not work correctly.
After removed those camera and leave on 1 camera and works!

UI interfaces animation is gone

I am creating an iOS project and are using some of the UI like Alert popup. In the beginning when activating the Alerts it popped up with a smooth animation. But suddenly there is no animations...? Even when I activate a web view it normally scrolled down from the top but now it just is there. Has anyone experinced this, and if yes... How to solve???
Thanks in advance.

Problems with OpenGL, touch and segue (at the same time) on iOS

Introduction
I made an iOS OpenGL app, which has 3 different views.
After the first view is "finished" (I touched something), there is a segue to the second view, etc..
Every view has it's own OpenGL rendering logic. Everything is working perfectly so far.
Problem
If I now keep my finger on the screen (or keep pressing the mouse in the simulator), my segue is still working, but my OpenGL view is not shown.
Any ideas why? Is this a common problem?
Already tried
I already tried to call touchesEnded (manually) in my call to touchStart, but this does not seem to solve the problem.

Resources