zhe hou are there any specific type of soft Keyboard avaible in cocos2d-x?
Posts 9
Added by zhe hou 10 months ago

Hello,

Say if we use CCTextFieldTTF and we attach IME, there is a default soft keyboard present. But if we want to get some specific type of soft keyboard, fox example, the keyboard only with number and dot, the keyboard with Chinese character, are there any way to get it? Or we have to build them by ourselves?

thanks & best regards,

HouZhe

Zhe Wang RE: are there any specific type of soft Keyboard avaible in cocos2d-x?
Posts 1642
Location Amoy, China
Added by Zhe Wang 10 months ago

CCTextFieldTTF hasn't wrapped this feature. You should hack into this class to custom your requirements.

Enjoy Coding, Enjoy Life.

Kiran F RE: are there any specific type of soft Keyboard avaible in cocos2d-x?
Posts 3
Added by Kiran F 3 months ago

Hi zhe hou,

So have you changed the default keyboard to what you need ???

I need to add 2 extra buttons to the default keyboard and need to change the text of return button..

Can you please tell me how can we acheive it ???

Thanks in Advance.

François Dupayrat RE: are there any specific type of soft Keyboard avaible in cocos2d-x?
Posts 44
Added by François Dupayrat 3 months ago

CCTextFieldTTF still doesn't allow that. You should look at CCEditBox in the extensions of cocos2d-x : there is a sample in the TestCpp project. It allows you to choose the preferred type of keyboard (the exact layout will depend on the device you use).

To add extra buttons, I don't think it's possible using CCEditBox. For iOS at least, you'll probably have to hack that yourself in the iOS implementation. You can find information about how to do that on Stackoverflow for example.


(1-3/3)