Hi, i been trying to figure out how to create a Button Class as a subclass of either CCLayer or CCMenuItemImage.
I been wrecking my head for days but i cant seem to get the correct result.
I am trying to make a Button class that works in a way that,
1) it will only respond when i touch the area of Button Image (i created a function that check if the touch is within the area of the image) [Thinking if there is any other better way]
2) Able to Hold down the button
3) Change Image from normalImage to selectedImage when i hold down
4) If Button is pressed once, it can swiftly change to selectedImage than back to normalImage.
Early Thanks for anyone who help, been on this for days
I tried to follow the CCMenuItemImage about closenormal on HelloWorld but i cant hold down the button