1
NGUI 3 Support / [Feature Request] UIButtonColor flag for turning off color tweening
« on: April 08, 2014, 02:56:52 AM »
If this is acceptable behavior, I'm going to start posting changes I've made to scripts that I believe others will find useful with the hope that these would be included in future builds.
The first one is quite simple. Just a boolean to turn off UIButton color tweening (on press, hover, etc).
In the UIButtonColor script I added:
and used it in the SetState method:
In the UIButtonColorEditor I added:
This way I can use my own color tweening or, if I don't want to have to set all colors to White when I don't need color tweening at all.
(If posts like this are not wanted or needed, please let me know)
The first one is quite simple. Just a boolean to turn off UIButton color tweening (on press, hover, etc).
In the UIButtonColor script I added:
- /// <summary>
- /// Whether or not the button gets its colors tweened
- /// </summary>
- public bool shouldTweenColors = true;
and used it in the SetState method:
- if (mState != state && shouldTweenColors)
In the UIButtonColorEditor I added:
- NGUIEditorTools.DrawProperty("Tween Colors?", serializedObject, "tweenColors");
This way I can use my own color tweening or, if I don't want to have to set all colors to White when I don't need color tweening at all.
(If posts like this are not wanted or needed, please let me know)
