Jump to content

Create tooltip on hover, destroy on mouse out?


Recommended Posts


I have a text with alpha: 0

When hovering over a sprite, I've done it so this text tweens to alpha: 1

But I've also set it up so that hovering over the text keeps it at alpha: 1 too.

This solution is stupid. Since the text will show when accidentally hovering over it.

I need to create the text when hovering the sprite, then tween it to alpha: 1 and tween back to alpha: 0 and destroy the text when no longer hovering neither the text or sprite.

I'm Lost here...

Help :'(

Link to comment
Share on other sites



This is what I'm doing:



When hovering over the "land" part, the +1 wood / -100 food shows.

I understand how I can do this with your plugin.


What I don't understand is, how I can make it behave the way it does in my game?


It takes 500 ms before it "disappears", which gives the user half a second to change focus to the text before it goes away.


I see no way for the user to interact with the tooltip with your plugin "from scratch".

But then again, I'm kind of new at all of this...

Link to comment
Share on other sites

The page doesn't open. In my plugin you can set: animationSpeedHide to 500 or whatever value to add the delay also animationDelay to add a direct delay.


If you want me to add a feature or if you add it yourself and you think it would be a nice addition you can do a pull request and I will review it.

Link to comment
Share on other sites

I don't understand how to do a pull request without forking.


I would like a feature where you can hover the tooltip itself and it stays visible.

That way, your plugin could be used to create all sorts of UI stuff.


The thing is, you need to have a bit of time to actually move the mouse from Target to Tooltip.

If animationDelay does the trick, then you don't need another property.

Otherwise, I'd also request hideDelay or something like that.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...