Keypad not showing in cocos2d-x 3.8.1

  • mihir77
    Likes 0

    Problem Description

    Hi,

    This is my code for textfield –

        auto emailField = TextField::create("Email", "Arial", 30);
        emailField->setPosition(Vec2(origin.x + visibleSize.width/2,
                                     origin.y + visibleSize.height/2));
        emailField->ignoreContentAdaptWithSize(false);
        emailField->setSize(Size(240, 160));
        emailField->setMaxLength(50);
        emailField->setMaxLengthEnabled(true);
        emailField->setColor(Color3B(0, 0, 0));
        emailField->setTextHorizontalAlignment(TextHAlignment::LEFT);
        emailField->setTextVerticalAlignment(TextVAlignment::CENTER);
        emailField->setTouchEnabled(true);
        emailField->addTouchEventListener([&](Ref* psender, Widget::TouchEventType type){
          log(“typing”);
        });

     

     

    In cocos2d-x 3.4, it used to show keypad when touched on textfield, now i updated to cocos2d-x 3.8.1 and it doesn't show keypad.

    Do i need to add something or modify something?

  • Sonar Systems admin
    Likes 0

    What device are you using?

  • mihir77
    Likes 0

    I am running in xcode simulator..

  • Sonar Systems admin
    Likes 0

    On simulator it can be dodgy, try on a physical device and it should be all good.

Login to reply