#include <UIButtonTest.h>
◆ UIButtonWithPolygonInfo()
| UIButtonWithPolygonInfo::UIButtonWithPolygonInfo |
( |
| ) |
|
◆ CREATE_FUNC()
◆ init()
| bool UIButtonWithPolygonInfo::init |
( |
| ) |
|
|
overridevirtual |
重载 UIScene .
在文件 UIButtonTest.cpp 第 1246 行定义.
1250 auto visibleSize = Director::getInstance()->getVisibleSize();
1252 SpriteFrameCache::getInstance()->addSpriteFramesWithFile(
"Images/poly_test_textures.plist");
1253 auto button = ui::Button::create();
1254 button->loadTextureNormal(
"poly_test/wheel_disc_back.png", ui::Widget::TextureResType::PLIST);
1255 button->setPosition(Vec2(visibleSize.width/2 - 100, visibleSize.height/2));
1256 button->setScale(0.5);
1257 button->setScale9Enabled(
true);
1260 auto buttonCopy = button->clone();
1261 button->setPosition(Vec2(visibleSize.width/2 + 100, visibleSize.height/2));
1262 addChild(buttonCopy);
virtual bool init() override
引用了 UIScene::init().
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp