Hi, I have a button in the class called “Shop”. And i’m using:
backButton->addTouchEventListener(CC_CALLBACK_2(HelloWorld::returnFromShop, this));
I’m using this code in Shop class, to call returnFromShop function when the button gets clicked. But returnFromShop() is in my main Class (HelloWorld). So it doesn’t work. the function needs to be in main class, and it needs to be non static. What can i do? thanks.