title: EventListener for buttons
body: <p>I'm developing a 2D car game using Cocos2d-x and I have a problem.
  I want to use Box2D to make collisions and movement managing easier, but before that I want to get my 4 buttons working.
  The point is that I have something like this</p>
  
  <p><strong>RaceScene.cpp</strong></p>
  
  <pre><code>bool Race::init() {
      //...
      auto forwardArrow = MenuItemImage::create("forward_arrow.png", "forward_arrow.png", CC_CALLBACK_1(Race::forward, this));
      forwardArrow-&gt;setAnchorPoint(Vec2(0,0));
  
      forwardArrow-&gt;setPosition(Vec2(origin.x + visibleSize.width - forwardArrow-&gt;getContentSize().width*1.2 ,
                              origin.y + forwardArrow-&gt;getContentSize().height));
      //...
  }
  
  void Race::forward(Ref* pSender)
  {
      /*MessageBox("YOU PRESSED THE FORWARD BUTTON","Alert");*/
  }
  </code></pre>
  
  <p>But I've noticed this is not the way because I can't neither press more than 1 button at a time nor change speed according to the time the button is pressed.</p>
  
  <p>So I've googled and checked Cocos documentation, and everybody talks about that EventListeners but I don't find how to add it to my problem.</p>
  
  <p><strong>I don't need to handle screen touches, I need to handle EACH button touch.</strong></p>
  
  <p>Thanks.</p>