#include <UILoadingBarTest.h>
◆ UILoadingBarTest_Right()
| UILoadingBarTest_Right::UILoadingBarTest_Right |
( |
| ) |
|
◆ ~UILoadingBarTest_Right()
| UILoadingBarTest_Right::~UILoadingBarTest_Right |
( |
| ) |
|
◆ CREATE_FUNC()
◆ init()
| bool UILoadingBarTest_Right::init |
( |
| ) |
|
|
overridevirtual |
重载 UIScene .
在文件 UILoadingBarTest.cpp 第 155 行定义.
161 Size widgetSize =
_widget->getContentSize();
164 Text *alert = Text::create(
"LoadingBar right",
"fonts/Marker Felt.ttf", 30);
165 alert->setColor(Color3B(159, 168, 176));
166 alert->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f - alert->getContentSize().height * 1.75f));
170 LoadingBar* loadingBar = LoadingBar::create(
"cocosui/sliderProgress.png");
171 loadingBar->setTag(0);
172 loadingBar->setDirection(LoadingBar::Direction::RIGHT);
174 loadingBar->setPosition(Vec2(widgetSize.width / 2.0f,
175 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::update |
( |
float |
delta | ) |
|
|
override |
◆ _count
| int UILoadingBarTest_Right::_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