Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - redmotion

Pages: [1]
1
NGUI 3 Support / Re: Keyboard for Windows Store Apps still broken?
« on: July 30, 2015, 04:38:23 PM »
So I restored to the original code for UIInput.CS for my project and compiled it without any tweaks to the code - on the tablet it shows the text Caret correctly - keyboard must be opened manually and none of the keys work.

Then without changing the #if statement as my opening post - I commented out all the METRO statements as per one of your earlier posts. Result: caret still shows correctly but keyboard doesn't show up when clicking in a text entry box. So if I manually bring up the touchscreen keyboard on the tablet - most of the keys work except for the delete key.

So the only conclusion one can draw is that the code in UIInput.CS is buggy for the windows tablet platform, some code is either being used when it shouldn't be or vice versa.

Pretty sure it's only a small change that's required. Perhaps just how the delete key is read.

I hope that helps.

2
NGUI 3 Support / Re: Keyboard for Windows Store Apps still broken?
« on: July 21, 2015, 01:23:04 PM »
Ok. Well I'm not using the keyboard text input! I'm using the touchscreen keyboard with a standard Ngui text box.

Which has a sprite with the UI input script, and a UI label as its child. I click on it in the unity editor and the text inside the label is highlighted, a caret is visible next to the text and I can edit using the keyboard.

If I do the same on the windows store app, I get the keyboard and the ability to type the text into the UI label BUT there is no Caret.

I hope that is clear.  :)

3
NGUI 3 Support / Re: Keyboard for Windows Store Apps still broken?
« on: July 16, 2015, 11:46:02 PM »
The text entry box that uses a NGUI UI label script that the NGUI UI input references.

Quote
NGUI's one is only used if you chose to hide input on UIInput.

Not sure exactly what you mean. That all soft keyboards for every OS supply their own blinking text cursors for text entry boxes?

4
NGUI 3 Support / Re: Keyboard for Windows Store Apps still broken?
« on: July 16, 2015, 05:08:36 PM »
The text cursor that is usually a blinking line in the text entry box is hidden.

5
NGUI 3 Support / Re: Keyboard for Windows Store Apps still broken?
« on: July 15, 2015, 03:48:04 PM »
Many Thanks Aren. I did what you suggested on all the METRO entries in UIInput.CS

It's almost working how I'd like now. Keyboard pops up, and I can type on all the keys and use the delete.

However, I can't see the caret.

Is there a way to make it reappear?

Many thanks again for your time.

6
NGUI 3 Support / Re: Keyboard for Windows Store Apps still broken?
« on: July 13, 2015, 03:11:32 AM »
Thanks for your reply. I hear what you're saying but...

The keyboard does not open on a Windows Tablet with the default NGUI code.

If I change UIInput.CS to what I mentioned in my opening post - it does open.

I have checked the keyboard for text entry boxes with uGUI to see if it was a fundamental flaw with the Unity code and how it deals with this tablet keyboards on windows. The result was - it works perfectly with uGUI.

As far as I can tell - the NGUI/UIInput.CS doesn't correctly allocate the right code to work with the screen keyboard on the WinRT platform.

All I would like is the delete key to work properly. I don't think its an unreasonable ask.

Is there something I can do to make it work?

7
NGUI 3 Support / Re: Keyboard for Windows Store Apps still broken?
« on: July 11, 2015, 04:14:23 PM »
Extra info: This is on a windows tablet - not a laptop/desktop.

8
NGUI 3 Support / Keyboard for Windows Store Apps still broken?
« on: July 09, 2015, 05:47:44 PM »
I've been searching all over to find a post to make the Windows Store touchscreen keyboard function properly with NGUI 3.9.0 & Unity 5.1.

I've changed the opening line in UIInput.CS to

  1. #if !UNITY_EDITOR && (UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_WP_8_1 || UNITY_BLACKBERRY || UNITY_WINRT || UNITY_METRO )

Which means it pops up if you click inside a text box.

However, delete does not work. I've found several pieces of code but they are for old NGUI versions and sit inside functions/coroutines that are gone now.

Has anyone found a workaround for this?

Many thanks in advance.

9
Thanks Aren, that will make my code less of a hack job!

10
After watching this https://www.youtube.com/watch?v=K3lvXIvJFKc

I decided to cheat (e.g.: avoid the first approach using eventdelegate) and use:

  1. UIButton third = assignmentEntry.transform.GetChild(2).GetComponent<UIButton>();
  2. third.name =   i.ToString(); // setting each button name to a unique number (i) in the for loop
  3. EventDelegate.Set( third.onClick, onClickAssignmentListEntry )

and changed the target function to:-

  1. public void onClickAssignmentListEntry (  ) {
  2. Debug.LogWarning ( UIButton.current.name +" button pressed" );
  3.         }

Getting me the same result without the hoop jumping required with event delegate parameters.

Feel free to post a better solution!

11
I can add a function via code to a series of instantiated prefabs with this:-

  1. UIButton third = assignmentEntry.transform.GetChild(2).GetComponent<UIButton>(); // gets the button component
  2.                        
  3. EventDelegate.Set( third.onClick, onClickAssignmentListEntry );  // adds the onClickAssignmentListEntry function fine

However, I want the function to receive an argument so I can identify which button out of the prefabs was pressed ( each will be given an individual number).

I am aware that I need to use the EventDelegate.Parameter to add these arguments before setting the event delegate, however I can’t work out how this should be structured.

Ideally the function would be:-

  1. public void onClickAssignmentListEntry ( int entry number ) {
  2.         // each button will have it’s own entry number
  3. }

How do I create an event delegate to enable the function onClickAssignmentListEntry to be passed an integer ( or a string that I can cast to an integer)?

Many thanks in advance.

Pages: [1]