how do i specify the maximum length of CCTextFieldTTF?

hi guys.

I want to set CCTextFieldTTF max length. but i can’t find attribute.

and i how can i change keyboard type?

i attachWithIme use like this

textField_MafiaCode1->attachWithIME();

i need Numeric Keypad.
I do not know if I’ve been looking all over the document.
(Of course, I could not May be found)
3 days did not find a solution.

Anyway
Let me know if you get a good idea.

Sorry CCTextFieldTTF has no interface for switching numeric keypad.
You can get callback to CCTextFieldTTF::insertText(const char*, int) at each input, judge the character in this function.
The platform related source code is in platform/ios/EAGLView.mm, start from pragma mark UIKeyInput protocol

thanks.
so, if i use numeric keypad.
The fastest way to build them myself?

1 Like