Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: latas on July 19, 2014, 02:32:03 AM
-
Hi again guys, building our app for Windows Store 8.1 (not windows phone ) we're experiencing and issue which we consider is the same of some weeks ago. We can not use the UIInput as it happened with Windows Phone some weeks ago.
The behavior is, trying to click with the mouse in the text box to begin to write something the focus is returned so you can not type anything. Clicking mouse very fast and keyboard at time you're able to send one key only.
Thank you very much.
-
I fixed it by myself ( don't know further implications ) by removing in the UIInput.cs the define corresponding to WINRT to work as Mobile.
I mean, replacing this:
#if !UNITY_EDITOR && (UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY || UNITY_WINRT)
by this:
#if !UNITY_EDITOR && (UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY)
Let me know if that's right :)
Thank you.
-
I'm not sure I understand what it means when you say "the focus is returned". WSA apps (touch screen apps) need a touch screen keyboard, which is why they are a part of the mobile group.
-
I mean if you run the windows store app with a Desktop PC?
-
Your code change will make it work as expected on a desktop PC, but it won't work at all on touch screen based devices. Remember, WSA is more than just desktop.
-
But we're releasing our game for Windows Phone, which I guess is used also for tablets. So I understand your point that not all WinRT devices are Desktop PC's, but so? How to manage this situation, because people with Desktop PC, can't do today fill our UIInput box.
Any idea?
Will you consider this as a bug?
Thank you.
-
Well as I said in my first reply, I don't understand what the issue is to begin with. What does "focus returned" mean?
-
Ah ok!! :) Sorry. The behaviour is you just click with the mouse in the UIInput with the hope to write in, and then you can see the cursor flashes once in the UIInput, and afterthat the input box lost the cursor and you're not in anymore. It is very similar to the behaviour you fixed some weeks ago about UIInput and WP8. So you can not write in anything, because you're typing and the cursor is not in the uiinput box. I usually called to that to get or receive the focus. Maybe in english is said in a different way. So I click the UIInput with the mouse with the hope that component UIInput get the focus on it and let me type in. As soon I click in the UIInput it looses the focus inmediately. So you never can type anything in the input box.
I hope I explain the issue.
Sorry is a bit difficult when it is not your native language.
Thank you very much.
-
Have you tried unchecking mouse events from the UICamera? Perhaps you are receiving both mouse and touch events from the same action.
-
Nope. It doesn't work. The behavior is the same.
-
We're also detecting problems in the Drag method for WSA. Maybe it is a problem of events for this platform.
Best regards.
-
I'd need to know which events you are receiving. If I understand you correctly, you click on an input field and it gains and then immediately loses focus? So what has focus then? I haven't heard of other issues with WSA/WP8 recently. Are you using the latest NGUI?
-
Yes I'm using latest NGUI. It is true I don't have the issue with WP8. Only WSA. Anyway it looks Unity has introduce a regression in the latest patch regarding to the GetProperty and GetField methods of Reflection. I know apparently there is no issue with NGUI about that, but I'm talking with the guy of HOTWeen because we use that and it is failing when run the game. It doesn't failed directly in the Editor, and there is no fail when compiling in Visual Studio. But it fails in runtime. So I think maybe we should hold this issue until Unity fix that problem, because maybe the origin of the issue comes from the same place.
Thank you.