cc.EditBox and Passwords

Hi!

I’m trying to set the InputFlag for an EditBox with mytxtbox.setInputFlag(). I’ve tried several things but I’m not able to figure out how to pass the correct parameters to be able to have a Password-enabled input-Field.

Does anyone know how to achieve this?

Thanks!

Carsten Sandtner

Nevermind. Just set it to 0 works. Dunno why I didn’t try it.

mytxtbox.setInputFlag(0)

So does it work ok now?

Hi,

yes works perfect!

I would personally do it this way:

EditBox *passField = KDAssets::LoadEditBox(textfieldSize);
passField->setPlaceHolder("password");
passField->setInputFlag(EditBox::InputFlag::PASSWORD);