Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17115

Handling EditBox with Cocos Creator

$
0
0

@cocosdan wrote:

I'm having big troubles to handle EditBox with CocosCreator, and as I didn't found doc nor example with current version (1.0), I need someone who can put me in the right direction (@pandamicro maybe ? wink )

I have a canvas with several EditBox, and for all EditBox, I'm using the same handler event functions which are located in a JavaScript file related to this canvas.

I'm trying to handle EditBox the same way I did before. For example, my 'didBegin' handler is like this:

editBoxDidBegin: function (sender) {
   (...)
}

The problem is that when I trace what happen in the debugger:
- 'this' point to the canvas, which is normal
- sender is undefined...

How can I know which EditBox is currently beeing edited?
There is no event parameter or anything else related to the edit box event beeing triggered?

Do I need to have a JavaScript file dedicated to handling EditBox events, so I'll be sure 'this' will be related to the EditBox beeing edited?

--
Daniel

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>