| 493 | } |
| 494 | |
| 495 | void AbstractCheckButton::frontCrossTextureScaleChangedWithSize() |
| 496 | { |
| 497 | if (_ignoreSize) |
| 498 | { |
| 499 | _frontCrossRenderer->setScale(1.0f); |
| 500 | } |
| 501 | else |
| 502 | { |
| 503 | Vec2 textureSize = _frontCrossRenderer->getContentSize(); |
| 504 | if (textureSize.width <= 0.0f || textureSize.height <= 0.0f) |
| 505 | { |
| 506 | _frontCrossRenderer->setScale(1.0f); |
| 507 | return; |
| 508 | } |
| 509 | float scaleX = _contentSize.width / textureSize.width; |
| 510 | float scaleY = _contentSize.height / textureSize.height; |
| 511 | _frontCrossRenderer->setScaleX(scaleX); |
| 512 | _frontCrossRenderer->setScaleY(scaleY); |
| 513 | } |
| 514 | _frontCrossRenderer->setPosition(_contentSize.width / 2, _contentSize.height / 2); |
| 515 | } |
| 516 | |
| 517 | void AbstractCheckButton::backGroundDisabledTextureScaleChangedWithSize() |
| 518 | { |
no test coverage detected