#include <TextInputTest.h>
◆ CREATE_FUNC()
◆ onClickTrackNode()
| void TextFieldTTSetCursorFromPoint::onClickTrackNode |
( |
bool |
bClicked, |
|
|
const cocos2d::Vec2 & |
touchPos |
|
) |
| |
|
overridevirtual |
实现了 KeyboardNotificationLayer.
在文件 TextInputTest.cpp 第 413 行定义.
419 CCLOG(
"TextFieldTTSetCursorFromPoint:TextFieldTTF attachWithIME");
420 pTextField->attachWithIME();
423 pTextField->setCursorFromPoint(touchPos, Camera::getVisitingCamera());
428 CCLOG(
"TextFieldTTSetCursorFromPoint:TextFieldTTF detachWithIME");
429 pTextField->detachWithIME();
cocos2d::Node * _trackNode
引用了 KeyboardNotificationLayer::_trackNode.
◆ onEnter()
| void TextFieldTTSetCursorFromPoint::onEnter |
( |
| ) |
|
|
overridevirtual |
重载 TestCase .
在文件 TextInputTest.cpp 第 433 行定义.
438 auto s = Director::getInstance()->getWinSize();
440 auto pTextField = TextFieldTTF::textFieldWithPlaceHolder(
"<click here for input>",
443 addChild(pTextField);
445#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
448 pTextField->setPosition(Vec2(s.width / 2, s.height / 2 + 50));
450 pTextField->setPosition(Vec2(s.width / 2, s.height / 2));
virtual void onEnter() override
引用了 KeyboardNotificationLayer::_trackNode, FONT_NAME, FONT_SIZE , 以及 TestCase::onEnter().
◆ subtitle()
| std::string TextFieldTTSetCursorFromPoint::subtitle |
( |
| ) |
const |
|
overridevirtual |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/TextInputTest/TextInputTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/TextInputTest/TextInputTest.cpp