#include <Bug-14327.h>
|
| virtual void | update (float dt) override |
| |
◆ CREATE_FUNC()
◆ editBoxEditingDidBegin()
| void Bug14327Layer::editBoxEditingDidBegin |
( |
cocos2d::ui::EditBox * |
editBox | ) |
|
|
overridevirtual |
◆ editBoxEditingDidEndWithAction()
| void Bug14327Layer::editBoxEditingDidEndWithAction |
( |
cocos2d::ui::EditBox * |
editBox, |
|
|
cocos2d::ui::EditBoxDelegate::EditBoxEndAction |
EditBoxEndAction |
|
) |
| |
|
overridevirtual |
◆ editBoxReturn()
| void Bug14327Layer::editBoxReturn |
( |
cocos2d::ui::EditBox * |
editBox | ) |
|
|
overridevirtual |
◆ editBoxTextChanged()
| void Bug14327Layer::editBoxTextChanged |
( |
cocos2d::ui::EditBox * |
editBox, |
|
|
const std::string & |
text |
|
) |
| |
|
overridevirtual |
在文件 Bug-14327.cpp 第 105 行定义.
107 log(
"editBox %p TextChanged, text: %s ", editBox, text.c_str());
◆ init()
| bool Bug14327Layer::init |
( |
| ) |
|
|
overridevirtual |
在文件 Bug-14327.cpp 第 40 行定义.
42 if (BugsTestBase::init())
44 auto glview = Director::getInstance()->getOpenGLView();
45 auto visibleOrigin = glview->getVisibleOrigin();
46 auto visibleSize = glview->getVisibleSize();
48 auto pBg = Sprite::create(
"Images/HelloWorld.png");
49 pBg->setPosition(Vec2(visibleOrigin.x + visibleSize.width / 2, visibleOrigin.y + visibleSize.height / 2));
54 _TTFShowTime = Label::createWithSystemFont(
"Edit control will be removed after 00:20!",
"Arial", 20);
55 _TTFShowTime->setPosition(Vec2(visibleOrigin.x + visibleSize.width / 2, visibleOrigin.y + visibleSize.height - 60));
59 auto editBoxSize = Size(visibleSize.width - 100, visibleSize.height * 0.1);
61 std::string pNormalSprite =
"extensions/green_edit.png";
62 _edit = ui::EditBox::create(editBoxSize + Size(0, 20), ui::Scale9Sprite::create(pNormalSprite));
63 _edit->setPosition(Vec2(visibleOrigin.x + visibleSize.width / 2, visibleOrigin.y + visibleSize.height / 2));
64 _edit->setFontColor(Color3B::RED);
65 _edit->setReturnType(ui::EditBox::KeyboardReturnType::DONE);
66 _edit->setDelegate(
this);
67 this->addChild(
_edit);
69 this->scheduleUpdate();
cocos2d::Label * _TTFShowTime
cocos2d::ui::EditBox * _edit
引用了 _edit, _removeTime , 以及 _TTFShowTime.
◆ title()
| virtual std::string Bug14327Layer::title |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ update()
| void Bug14327Layer::update |
( |
float |
dt | ) |
|
|
overrideprotectedvirtual |
在文件 Bug-14327.cpp 第 76 行定义.
81 ldiv_t ret = ldiv(delta, 60L);
83 snprintf(str, 100,
"%s%.2ld:%.2ld",
"Edit control will be removed after ", ret.quot, ret.rem);
88 _edit->removeFromParent();
90 _TTFShowTime->setString(
"Edit control has been removed!\nIt should not crash.");
91 this->unscheduleUpdate();
引用了 _edit, _removeTime , 以及 _TTFShowTime.
◆ _edit
| cocos2d::ui::EditBox* Bug14327Layer::_edit |
|
private |
◆ _removeTime
| time_t Bug14327Layer::_removeTime |
|
private |
◆ _TTFShowTime
| cocos2d::Label* Bug14327Layer::_TTFShowTime |
|
private |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/BugsTest/Bug-14327.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/BugsTest/Bug-14327.cpp