PhaseTips: Tooltip UI Component for Phaser.io

Phasetips is a tooltip UI component made to be used with PhaserJS game framework.

Phasetips

Download it here or check the source code: https://github.com/netgfx/Phasetips

Let’s see how that works

To create a simple tooltip with a text that hovers over the target item all you have to do is:

var tip1 = new Phasetips({
    targetObject: targetObj, //can be any phaser object (sprite, group, text, image, etc...)
    context: "A cute bunny but with a lot of text, that needs to wrap!",
    strokeColor: 0xff0000, // red stroke
    position: "top" // where we want the tooltip to appear
  });

The event listeneres for hoverOver/hoverOut are added via the plugin automatically.

Enjoy!

Facebooktwittergoogle_pluspinterestlinkedin
linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *