jflowers45

Hand cursor on buttons

Recommended Posts

@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);

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.