本文整理汇总了C++中TextFieldTTF::attachWithIME方法的典型用法代码示例。如果您正苦于以下问题:C++ TextFieldTTF::attachWithIME方法的具体用法?C++ TextFieldTTF::attachWithIME怎么用?C++ TextFieldTTF::attachWithIME使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextFieldTTF
的用法示例。
在下文中一共展示了TextFieldTTF::attachWithIME方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
bool MainScene::init()
{
if ( !Layer::init() )
{
return false;
}
_size = Director::getInstance()->getWinSize();
_xPosition = 0;
_xMoved = 0;
_touchListener = EventListenerTouchOneByOne::create();
_touchListener->onTouchBegan = CC_CALLBACK_2(MainScene::touchBegan,this);
_touchListener->onTouchMoved = CC_CALLBACK_2(MainScene::touchMoved, this);
_touchListener->onTouchEnded = CC_CALLBACK_2(MainScene::touchEnded,this);
getEventDispatcher()->addEventListenerWithFixedPriority(_touchListener, 100);
addScreen(1, new MainScreen);
addScreen(2, new MainScreen);
_fon = Sprite::create("img/ScreenFon.png");
_fon->setScaleX(_size.width/_fon->getContentSize().width);
_fon->setScaleY(_size.height/_fon->getContentSize().height);
_fon->setPosition(Point(_size.width/2, _size.height/2));
this->addChild(_fon,0);
_menu = new MenuView;
_menu->initialization(this);
TextFieldTTF * tf = TextFieldTTF::textFieldWithPlaceHolder("click for input",
"fonts/menuFont.otf",
26);
tf->setPosition(Point(300,300));
this->addChild(tf, 10);
tf->attachWithIME();
//this->schedule(schedule_selector(MainScene::update),0.05f);
return true;
}