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

Pages: [1]
1
NGUI 3 Support / Re: Can't resize UIWidget when anchor type is unified.
« on: January 09, 2014, 05:01:31 PM »
Originally, I was thinking it was as simple as:

- Change the anchor type to "None"
- Move the UIWidget as necessary
- Reset the anchor type to "Unified"

However, after doing some quick testing, I see the anchor points may be redefined by NGUI at step #3 above.  Is that the real problem?  It seems that if the original anchor points were retained from step #1, that the above would be no more difficult to use than your proposed lock/unlock feature.  Is that true, or am I still missing something (which is entirely possible as I'm new to NGUI...)?

Thanks,

Jeff

2
NGUI 3 Support / Re: Can't resize UIWidget when anchor type is unified.
« on: January 09, 2014, 03:45:53 PM »
Why can't you simply turn off the Unified anchor, move the widget, and turn the Unified anchor back on?  How does that differ from your proposed lock/unlock feature?

3
NGUI 3 Support / Re: Tween with zero Duration stays in "Playing" mode?
« on: January 06, 2014, 09:59:09 PM »
Perfect - thanks for the great support!

Jeff

4
NGUI 3 Support / Re: Tween with zero Duration stays in "Playing" mode?
« on: January 06, 2014, 09:56:28 PM »
Thanks.  Yeah, I like that better as the onFinished delegate should fire correctly now.

I'll update my code.  I guess I'd expect this to be rolled into the release at some point?

Jeff

5
NGUI 3 Support / Re: Tween with zero Duration stays in "Playing" mode?
« on: January 06, 2014, 09:51:30 PM »
Try adding this to the end of UITweener.Update function:
  1. // Disable the tween if the duration is zero
  2. if (duration == 0f) enabled = false;

In addition to the above comments... Are you OK with the "duration == 0f"?  I'm just always leery of testing for equality with non-integer values.

Jeff

6
NGUI 3 Support / Re: Tween with zero Duration stays in "Playing" mode?
« on: January 06, 2014, 09:48:10 PM »
Thanks for the input.  I've added the code and I assume it should take care of the problem.  I'll try to set up a test case soon to verify that.

While I was in there though, I wonder if the "onFinished" delegate will get properly called in the zero-duration case or if it might need an adjustment also?

Jeff

7
NGUI 3 Support / Tween with zero Duration stays in "Playing" mode?
« on: January 06, 2014, 05:47:47 PM »
I have several a tweens (specifically, TweenTransforms) with 0 duration (these used to have positive durations, but I'm testing something).  I noticed that when the zero-duration tweens are played using UIPlayTween, they don't seem to shift out of playing mode on their own (even though they're set to PlayStyle = Once).  In UIPlayTween, I had to set "If already playing" to "Restart" in order to use them multiple times.

Is that expected?  Is setting a tween's duration to 0 considered valid? 

BTW, I'm not sure how to verify the version of NGUI I'm running, though it's only a week or two old.

Thanks,

Jeff


Pages: [1]