Author Topic: onTooltip on disabled Buttons  (Read 1659 times)


  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 29
    • View Profile
onTooltip on disabled Buttons
« 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?

i just checked Winward. For the abilities menu i guess you are disabling those buttons not with button.isEnebaled = false, right?


  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: onTooltip on disabled Buttons
« Reply #1 on: May 18, 2016, 04:42:20 AM »
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.