Hello Guest

Author Topic: How to Add Sprite Buttons  (Read 3705 times)

indy2005

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
How to Add Sprite Buttons
« on: March 11, 2014, 09:42:29 pm »
Hi,

If I want to add buttons for an iPad game using icons, whats the best approach to use please? 

Thanks

i

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to Add Sprite Buttons
« Reply #1 on: March 12, 2014, 11:36:08 am »
Use tk2d UI. Check out the samples & docs. The tutorial covers creating a button.

indy2005

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: How to Add Sprite Buttons
« Reply #2 on: March 12, 2014, 08:23:26 pm »
Hi,

I don't want a UI button, but really a good old fashioned sprite.

Regards

I

cakesauce

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: How to Add Sprite Buttons
« Reply #3 on: March 12, 2014, 09:23:28 pm »
Add a tk2dUIItem component to your sprite.  Ensure it has a collider.  Then wire the event via code or the inspector.

http://2dtoolkit.com/docs/latest/ui/system.html#understandingitem