#include <Texture2dTest.h>
◆ CREATE_FUNC()
◆ onEnter()
| void TexturePNG::onEnter |
( |
| ) |
|
|
overridevirtual |
重载 TextureDemo .
在文件 Texture2dTest.cpp 第 162 行定义.
166 auto s = Director::getInstance()->getWinSize();
168 auto img = Sprite::create(
"Images/test_image.png");
169 img->setPosition(Vec2( s.width/2.0f, s.height/2.0f));
171 log(
"%s\n", Director::getInstance()->getTextureCache()->getCachedTextureInfo().c_str());
175 auto i8 = Sprite::create(
"Images/test_image_i8.png");
176 i8->setPosition(s.width/4.0f, s.height/4.0f);
180 auto ai88 = Sprite::create(
"Images/test_image_ai88.png");
181 ai88->setPosition(s.width / 4.0f, s.height * 3.0f / 4.0f);
185 auto rgb888 = Sprite::create(
"Images/test_image_rgb888.png");
186 rgb888->setPosition(s.width * 3.0f / 4.0f, s.height / 4.0f);
190 auto rgba8888 = Sprite::create(
"Images/test_image_rgba8888.png");
191 rgba8888->setPosition(s.width * 3.0f / 4.0f, s.height * 3.0f / 4.0f);
virtual void onEnter() override
引用了 TextureDemo::onEnter().
◆ subtitle()
| std::string TexturePNG::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string TexturePNG::title |
( |
| ) |
const |
|
overridevirtual |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp