Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: The-Arrival on May 15, 2016, 08:07:13 AM
-
Hey Aren,
in my buildmenu evey build“button has a tooltip and gets disabled, when the player can“t affort it. Disabling a Button the NGUI-way (so that the diffrent coloring works and such) means, that the collider gets disabled, which also will disable the tooltip.
How is this tooltip/disable buttons system meant to be used for such a case? Or do i need to build a workaround for it?
P.S.:
i just checked Winward. For the abilities menu i guess you are disabling those buttons not with button.isEnebaled = false, right?
-
I don't disable the buttons. I have 2 identical sprites, one on top of another. One is colored darker than the other, and I also have one set to be Fill type (radial fill). This lets me do a visual cooldown timer, and "disabling" it is the same as setting a cooldown to 0. In fact, it's the same code. This way tooltips and sounds work as expected also. When the button is clicked I simply check to see if it should be clickable or not before performing the action.