Author Topic: Change Request UIInput.cs  (Read 7828 times)

Shorinji

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Change Request UIInput.cs
« on: November 18, 2012, 06:28:57 AM »
Hi,
I would like to be able to selected  the target of  SendMessage("OnInputChanged", this, SendMessageOptions.DontRequireReceiver); line 335, 370 and 382.
My personal need is to send it to eventReceiver.
Please let me know if you agree to implement that change.
Thanks in advance.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Change Request UIInput.cs
« Reply #1 on: November 18, 2012, 07:36:00 AM »
UIInput.current

Shorinji

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Change Request UIInput.cs
« Reply #2 on: November 18, 2012, 09:33:24 AM »
Hi,
Thanks for your answer.
I think i must be missing something. I checked this variable, it seems to be related to "OnSubmit", not to "OnInputChanged".
Can you confirm what did you mean please?
Thanks in advance.

Edit : I just want to precise that i already made the modification i need in the code but if it was integrated in the official code it would save me some merging time when i update NGUI.
« Last Edit: November 18, 2012, 09:35:21 AM by Shorinji »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Change Request UIInput.cs
« Reply #3 on: November 18, 2012, 03:53:48 PM »
Oh, sorry I misunderstood the original topic. The OnInputChanged function is for input validation, which ties closely with the UIInput's functionality. Sending it to the event receiver seems strange to me. It makes more sense for the script that does validation to remain on the same object as the UIInput itself.

Shorinji

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Change Request UIInput.cs
« Reply #4 on: November 19, 2012, 09:31:20 AM »
Well i guess it depends on the architecture of the GUI. I use the OnInputChanged message to update other controls in the panel as the input changes, not only when the input is submited, so, for me, it makes sense to send it to other objects.
But anyway, it's not a big deal if you don't want to change that, i will do the merging when updating.

adam718

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 60
    • View Profile
Re: Change Request UIInput.cs
« Reply #5 on: December 05, 2012, 10:00:05 PM »
Hi! Aren.
I also want you to change UIInput that other object can get InputChange event.
I made UIInputEx and added such function but it's not right doing.
Because UICamera.inputHasFocus alway captures <UIInput> component.

So I hope you change it in next update.
Otherwise could you tell me how I could use OnInputChange?

Kind Regards,
Adam.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Change Request UIInput.cs
« Reply #6 on: December 06, 2012, 05:19:20 AM »
Why not derive from UIInput?

Gillissie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
Re: Change Request UIInput.cs
« Reply #7 on: September 24, 2013, 10:35:52 AM »
I am interested in the same suggestion. It makes sense to me that all events happen on the selected event receiver. The argument that OnInputChanged is mainly for input validation doesn't make sense since there is the validator delegate to do that. I have made the change to our project, but it would be nice to have it a permanent change.