playMaker

Author Topic: NGUI input field help [SOLVED]  (Read 9153 times)

cmy

  • Playmaker Newbie
  • *
  • Posts: 40
NGUI input field help [SOLVED]
« on: March 03, 2014, 07:42:00 PM »
I posted this in another thread but it has been pretty quiet over there.

I am having an extremely difficult time getting OnSubmit to work from the Ngui events to Playmaker events. I have had no problem with all the other functions but I just can't seem to get an input field firing.

What I've done is created a simple input field from the ngui prefabs. I attached an fsm, Ive attached Ngui Events to Playmaker Events, I've attached Ngui events forwarder, and also applied the forwarder to On Submit Notify. I then created a state with Ngui>On Submit transition (I tried a global one as well) Is this incorrect? Clearly I am missing something. I can't find much other information on it.
« Last Edit: March 27, 2014, 03:10:45 PM by cmy »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI input field help
« Reply #1 on: March 04, 2014, 06:14:11 AM »
Hi,

What other threads has died? don't hesitate to bump threads to our attentions, the activity is getting so large that it's difficult to keep up, so by all means, bumping threads is seen as a good thing and help us keep track of things :)

It seems from my tests that UIInput actually calls "OnClick" when you press enter. what other means you expect the "onSubmit" to be called? I am not sure myself actually.

bye,

 Jean

cmy

  • Playmaker Newbie
  • *
  • Posts: 40
Re: NGUI input field help
« Reply #2 on: March 04, 2014, 07:04:44 PM »
OnClick does work for the input field, but it does just that. Works when you click on it which would technically be what the user would do before they started typing. It asks for OnSubmit so that when you type and push enter, it cycles your FSM but I just can't get it to work.

EDIT: I changed to OnInput which works technically. Every button stroke in the input field cycles the FSM. This doesn't really feel right but I'll leave it as is for now.

Thanks for the advice Jean  :)
« Last Edit: March 04, 2014, 07:08:53 PM by cmy »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI input field help
« Reply #3 on: March 06, 2014, 12:14:59 AM »
Hi,

 yep, I agree with you it's really not good. I am unsure myself and I have to investigate this some more cause onSubmit must work.

Can you bump me on this please, I am running behind, so its good to refresh my memory to move that up the stack :)

bye,

 Jean

Dualhammers

  • Playmaker Newbie
  • *
  • Posts: 10
Re: NGUI input field help
« Reply #4 on: March 27, 2014, 01:32:39 AM »
I also need this to function, and I cannot get OnSubmit to work.

cmy

  • Playmaker Newbie
  • *
  • Posts: 40
Re: NGUI input field help
« Reply #5 on: March 27, 2014, 02:32:53 AM »
I forgot to bump this, thanks Dualhammers. I still have not had any luck with it. Jean, if you get any time to look into this, that would be swell. :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI input field help
« Reply #6 on: March 27, 2014, 03:48:48 AM »
Hi,

 ok, I have addressed this:

redownload form the wiki:

https://hutonggames.fogbugz.com/default.asp?W1111

 For some reason, OnSubmit is dealt with differently than other ngui event... it doesn't really make sense... but I manage to find a way to make that consistent within this playmaker implementation.

 So now, if you do implement a "NGUI / ON SUBMIT" global event" bound to a UIInput, this playmaker event will be properly trigger as you press "Enter" when foxued on this UIInput text field.

bye,

 Jean

cmy

  • Playmaker Newbie
  • *
  • Posts: 40
Re: NGUI input field help
« Reply #7 on: March 27, 2014, 03:05:13 PM »
Yes, thank you! I'll try it out right now!

EDIT: Works like a dream, thanks again Jean! This really helped me out.
« Last Edit: March 27, 2014, 03:10:17 PM by cmy »

Dualhammers

  • Playmaker Newbie
  • *
  • Posts: 10
Re: NGUI input field help [SOLVED]
« Reply #8 on: March 27, 2014, 05:04:27 PM »
Did you update this for NGUI 2.X? I tried re-importing the 2.X package I just downloaded and it did not change.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI input field help [SOLVED]
« Reply #9 on: March 31, 2014, 08:35:20 AM »
Hi,

 No, previous versions of ngui support are frozen. typically, simply import that script, it will work, so when you import the ngui 3.x playmaker package, uncheck everything BUT the  Ngui events to Playmaker events script.

Bye,

 Jean