Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: pad406 on March 05, 2014, 02:33:48 PM

Title: Checkbox firing OnValueChange when 'tweened'
Post by: pad406 on March 05, 2014, 02:33:48 PM
I have a number of checkboxes (UIButton, UIToggle etc) grouped under a tween, so that when I click on a header they expand and I can change as necessary (see attached screenshot). However the first time I expand them each fires the OnValueChange. This only happens the first time, every other time they just expand as I'd expect. This unexpected behavior is annoying as I need to know each time a user actually changes one of the checkboxes. Any idea on what I'm missing

thanks
Paul
Title: Re: Checkbox firing OnValueChange when 'tweened'
Post by: ArenMook on March 06, 2014, 08:44:09 AM
OnValueChange fires when the checkbox starts up. It's the same as a similar event on the slider, for example. It's this way for consistency so that whatever data you has associated with the value is set properly on start.