| 920 | } |
| 921 | } |
| 922 | Vec2 Button::getNormalSize() const |
| 923 | { |
| 924 | Vec2 titleSize; |
| 925 | if (_titleRenderer != nullptr) |
| 926 | { |
| 927 | titleSize = _titleRenderer->getContentSize(); |
| 928 | } |
| 929 | Vec2 imageSize; |
| 930 | if (_buttonNormalRenderer != nullptr) |
| 931 | { |
| 932 | imageSize = _buttonNormalRenderer->getContentSize(); |
| 933 | } |
| 934 | float width = titleSize.width > imageSize.width ? titleSize.width : imageSize.width; |
| 935 | float height = titleSize.height > imageSize.height ? titleSize.height : imageSize.height; |
| 936 | |
| 937 | return Vec2(width, height); |
| 938 | } |
| 939 | |
| 940 | Vec2 Button::getNormalTextureSize() const |
| 941 | { |
no test coverage detected