Jump to content

Hand cursor on buttons


jflowers45
 Share

Recommended Posts

  • 2 years later...
  • 1 month later...
  • 8 months later...

@deedeekaka 
My workaround to set cursor on text is to attach a transparent tileSprite on it.

You can take the dimension of the text object and create tileSprite with the same size.

Then You add the tilesprite to the text as its Child.

Now you can inputEnable the tileSprite and apply cursor on it.

 

var backText = _t.make.text(-(popup_width / 2), (popup_height) - 90, SP.lang.backLabel, SP.font.blueSmallFont);
backText.anchor.setTo(0.5, 0);

var backTextclickArea = _t.make.tileSprite(0, 18, 190, 45, 'transparentPixel');
// The size cords could be generated dynamically !!!

	backTextclickArea.anchor.setTo(0.5, 0);
	backTextclickArea.inputEnabled = true;
	backTextclickArea.input.useHandCursor = true;
	backTextclickArea.events.onInputDown.add(_t.goBack, _t);
	backTextclickArea.input.priorityID = 10;

backText.addChild(backTextclickArea);

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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