#include <UILoadingBarTest.h>
◆ UILoadingBarTest_Right_Scale9()
| UILoadingBarTest_Right_Scale9::UILoadingBarTest_Right_Scale9 |
( |
| ) |
|
◆ ~UILoadingBarTest_Right_Scale9()
| UILoadingBarTest_Right_Scale9::~UILoadingBarTest_Right_Scale9 |
( |
| ) |
|
◆ CREATE_FUNC()
◆ init()
| bool UILoadingBarTest_Right_Scale9::init |
( |
| ) |
|
|
overridevirtual |
重载 UIScene .
在文件 UILoadingBarTest.cpp 第 263 行定义.
269 Size widgetSize =
_widget->getContentSize();
272 Text *alert = Text::create(
"LoadingBar right scale9 render",
"fonts/Marker Felt.ttf", 20);
273 alert->setColor(Color3B(159, 168, 176));
274 alert->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f - alert->getContentSize().height * 2.7f));
278 LoadingBar* loadingBar = LoadingBar::create(
"cocosui/slider_bar_active_9patch.png");
279 loadingBar->setTag(0);
280 loadingBar->setScale9Enabled(
true);
281 loadingBar->setCapInsets(Rect(0, 0, 0, 0));
282 loadingBar->setContentSize(Size(300, 13));
283 loadingBar->setDirection(LoadingBar::Direction::RIGHT);
285 loadingBar->setPosition(Vec2(widgetSize.width / 2.0f,
286 widgetSize.height / 2.0f + loadingBar->getContentSize().height / 4.0f));
cocos2d::Layer * _uiLayer
virtual bool init() override
cocos2d::ui::Layout * _widget
引用了 UIScene::_uiLayer, UIScene::_widget , 以及 UIScene::init().
◆ update()
| void UILoadingBarTest_Right_Scale9::update |
( |
float |
delta | ) |
|
|
override |
◆ _count
| int UILoadingBarTest_Right_Scale9::_count |
|
protected |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp