Built in keypad

Hey,

Is there any built in Keypad in cocos2d-x ? If so could you let me know name of the class/example to get me started?
User needs to be able to enter digits and dots ( floating numbers ).

I found CCLayer::setIsKeypadEnable method but this is as far as i understand only to use normal PC keyboard on simulator. Am I correct?

I’m developing using Airplay, Cocos2d-x for Iphone.

Thnx
P

CCTextField is right for you. You can see the video in news.
CCKeypadDelegate is for android menu/back hardware keys.

Thnx much, Wang.
P

Hey Wang,

Did you mean CCTextFieldTTF ?
Anyway, CCTextFieldTTF has not been implemented on Airplay as far as I can see from cocos2d.h.

Any other suggestions (still using airplay).

thnx
P

oh, sorry, CCTextFiled hasn’t been implemented on airplay yet. I know a little about airplay, this port is maintained by Max Aksenov

In my opinion, the aim of CCTextField is to wrap the text input APIs in c++ to cross-platform. But airplay sdk must already has this same feature. Why not use this interface directly from airplay sdk. I think it would be better.

thnx Wang.

I had a quick look on Airplay (Marmolade?) CIwUITextInput - which is keyboard event handler.

From what I remember the problem was, that this handler needs two Airplay engines: IwUI and IwGx. IwGx is Airplay rendering engine - sort of OpenGL competitor. Cocos2d uses OpenGL - and from what I read it should be possible to run both simultaneously. In my quick test, it fell into pieces. Also starting another rendering engine just to implement key handling on limited resources devices - not cool :slight_smile:

(can you move this topic to Airplay forum? sorry, my mistake)
P