| 847 | } |
| 848 | |
| 849 | void BasicMediaController::updateControlsForContentSize(const Vec2& contentSize) |
| 850 | { |
| 851 | if (!_controlsReady) |
| 852 | return; |
| 853 | |
| 854 | _mediaOverlay->setContentSize(contentSize); |
| 855 | _controlPanel->setContentSize(contentSize); |
| 856 | |
| 857 | auto scale = Director::getInstance()->getRenderView()->getScaleY(); |
| 858 | _primaryButtonPanel->setScale(1 / scale); |
| 859 | _timelineTotal->setContentSize(Size(contentSize.width - 40, _timelineBarHeight / scale)); |
| 860 | _timelineSelector->setContentSize(Size(_timelineBarHeight, _timelineBarHeight) * 1.5f / scale); |
| 861 | _fullScreenEnterButton->setScale(1 / scale); |
| 862 | _fullScreenExitButton->setScale(1 / scale); |
| 863 | |
| 864 | _fullScreenEnterButton->setPositionNormalized(Vec2()); |
| 865 | _fullScreenEnterButton->setPositionNormalized(Vec2(0.03f, 0.97f)); |
| 866 | _fullScreenExitButton->setPositionNormalized(Vec2()); |
| 867 | _fullScreenExitButton->setPositionNormalized(Vec2(0.03f, 0.97f)); |
| 868 | } |
| 869 | |
| 870 | MediaPlayer::MediaPlayer() |
| 871 | { |
nothing calls this directly
no test coverage detected