| 3579 | //------------------------------------------------------------------ |
| 3580 | |
| 3581 | SpriteNilTexture::SpriteNilTexture() |
| 3582 | { |
| 3583 | auto s = Director::getInstance()->getWinSize(); |
| 3584 | |
| 3585 | Sprite* sprite = nullptr; |
| 3586 | |
| 3587 | // TEST: If no texture is given, then Opacity + Color should work. |
| 3588 | |
| 3589 | sprite = Sprite::create(); |
| 3590 | sprite->setTextureRect(Rect(0, 0, 300, 300)); |
| 3591 | sprite->setColor(Color3B::RED); |
| 3592 | sprite->setOpacity(128); |
| 3593 | sprite->setPosition(Vec2(3 * s.width / 4, s.height / 2)); |
| 3594 | addChild(sprite, 100); |
| 3595 | |
| 3596 | sprite = Sprite::create(); |
| 3597 | sprite->setTextureRect(Rect(0.0f, 0.0f, 300.0f, 300.0f)); |
| 3598 | sprite->setColor(Color3B::BLUE); |
| 3599 | sprite->setOpacity(128); |
| 3600 | sprite->setPosition(Vec2(1 * s.width / 4, s.height / 2)); |
| 3601 | addChild(sprite, 100); |
| 3602 | } |
| 3603 | |
| 3604 | std::string SpriteNilTexture::title() const |
| 3605 | { |
nothing calls this directly
no test coverage detected