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 - Maxii

Pages: 1 2 3 [4]
46
NGUI 3 Support / Re: Event system vs fallthrough
« on: August 19, 2013, 05:52:24 PM »
Thanks for the clarification.  :)

47
NGUI 3 Support / OnLeftClick
« on: August 19, 2013, 10:06:25 AM »
I'm using all the UIButton XXX scripts (including UIButton Play Animation, Sound) on NGUI buttons with an OnClick trigger. As currently implemented in these core Ngui classes, any Mouse Button Click over the button actuates OnClick().

My objective is to limit this actuation to just the left mouse button.  As I want to continue to incorporate Ngui updates and bug fixes, I don't want to modify these Ngui core classes, so how do I limit these core Ngui button scripts to just the left mouse click? I thought to just override those methods but the OnClick() methods in the Play Animation and Sound classes are private, so I can't.

48
NGUI 3 Support / Re: UIEventListener vs OnClick
« on: August 19, 2013, 09:19:08 AM »
Clarification: So the principal reason to use EventListener to subscribe is so one can unsubscribe (when an instantiable gameobject is destroyed for instance)? If one doesn't need to unsubscribe (as in a permanent UI gameobject for instance), then simply implementing OnClick() on the receiving gameobject is sufficient?

49
NGUI 3 Support / Re: Event system vs fallthrough
« on: August 19, 2013, 09:10:34 AM »
I believe the clarification P (and I) am looking for is why gameobjects (with colliders) that implement one event handler like OnClick() but not another (like OnHover(), still consume the OnHover() event (it doesn't fall thru) sent by the camera when on the same layer as the camera's event receiver mask...

50
NGUI 3 Support / UIEventListener vs OnClick
« on: August 18, 2013, 04:53:23 PM »
I'm curious. I've used both

  1. UIEventListener.Get(thisGameobject).onClick += MyOnClickMethod;
  2. void MyOnClickMethod(GameObject sender) { // do something }

and

  1. void OnClick() { MyOnClickMethod() }
  2. void MyOnClickMethod() { // do something }

to interact with Ngui events. What are the differences, advantages/disadvantages, etc.?

btw, Great product! Can't wait to see what you do with Unity's next gen GUI!



51
Just downloaded 2.3.4. UISlider current code has not been changed to remove the bug. Confirming UICheckbox has been changed.

52
On 2.3.1, for both UICheckbox and UISlider, current is not updated to this when using a delegate rather than the Event Receiver callback system.

53
NGUI 3 Support / UISlider delegate OnValueChanged
« on: February 02, 2013, 08:55:20 AM »
I want to use the delegates for event notification that were added in 2.1.3. While I see how to use
those in UIEventListener [UIEventListener.Get(goWantingToReceiveEvent).event += eventHandler;], I don't
see how to use the one now included in UISlider, aka OnValueChanged(float).

Edit: I figured it out. remoteSliderScript.onValueChanged += LocalHandlerForSliderOnValueChanged;

54
NGUI 3 Support / Re: LagPosition
« on: July 03, 2012, 03:00:09 PM »
Thanks. I dug in deeper after I asked the question and finally figured it out. You actually are running a single CoRoutine that executes all the methods passed to run as 'CoRoutines' once per frame (via a yield return null).
This single CoRoutine is customized in UpdateManager to ignore deltaTime.

I think it was the method naming and the need to read the code as 'documentation' that took me so long to figure out.

Thanks for the quick response.

55
NGUI 3 Support / LagPosition
« on: July 03, 2012, 02:13:46 PM »
Just bought NGUI!

Looking at the code for LagPosition, I'm confused as to why you place your Lerp method in a CoRoutine rather than in LateUpdate when you don't want elapsed time to be included.

I'm also not clear on the point of a CoRoutine that doesn't include a Yield statement.

Finally, I can see that placing the Lerp function in LateUpdate causes it to be continuously executed each frame, but placing it in a coroutine would seem to only run once as it would complete when the Lerp method completed the first time...

Obviously I'm confused on something rather basic but I've searched for hours on the subject without joy. :-(

Thanks for the clarification.

Pages: 1 2 3 [4]