Hi,
I’ve a layer with a CCTextFieldTTF and a CCMenu. While the textfield is attached with IME (i.e.: Keyboard is visible), the menu doesn’t get touches. I tried to decrease the menu priority (~~200,~~255) but the problem remains.
Here is my code in the CCLayer init:
cocos2d::CCLabelTTF *messageLabel = ZLabels::messageLabel("Insert your name:");
messageLabel->setPosition(cocos2d::CCPoint(getContentSize().width / 2, getContentSize().height / 2 + rowSize * 4));
addChild(messageLabel);
cocos2d::CCTextFieldTTF *nameText = cocos2d::CCTextFieldTTF::textFieldWithPlaceHolder("",
ZFonts::messageFontName(),
ZFonts::messageFontSize());
nameText->setColorSpaceHolder(cocos2d::ccc3(255,250,9));
nameText->setColor(cocos2d::ccc3(255,250,9));
nameText->setPosition(cocos2d::CCPoint(getContentSize().width / 2, getContentSize().height / 2 + rowSize * 3));
nameText->setDelegate(this);
addChild(nameText);
nameText->attachWithIME();
m_menu = cocos2d::CCMenu::create(cocos2d::CCMenuItemLabel::create(ZLabels::messageLabel("Save"),
m_selectorTarget,
m_notifyUserName),
cocos2d::CCMenuItemLabel::create(ZLabels::messageLabel("Cancel"),
m_selectorTarget,
m_closeDialog),
NULL);
m_menu->alignItemsHorizontallyWithPadding(40.0);
m_menu->setPosition(cocos2d::CCPoint(getContentSize().width / 2, getContentSize().height / 2 + rowSize * 1));
addChild(m_menu);
Thanks for the help.
Giannandrea