MCPcopy Create free account
hub / github.com/axmolengine/axmol / updateControls

Method updateControls

core/ui/UIMediaPlayer.cpp:838–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

836}
837
838void BasicMediaController::updateControls()
839{
840 if (_mediaPlayer && _controlsReady)
841 {
842 const auto currentTime = _mediaPlayer->getCurrentTime();
843 const auto duration = _mediaPlayer->getDuration();
844 auto& totalSize = _timelineTotal->getContentSize();
845 _timelinePlayed->setContentSize(Size(totalSize.width * (currentTime / duration), totalSize.height));
846 }
847}
848
849void BasicMediaController::updateControlsForContentSize(const Vec2& contentSize)
850{

Callers

nothing calls this directly

Calls 5

SizeFunction · 0.50
getCurrentTimeMethod · 0.45
getDurationMethod · 0.45
getContentSizeMethod · 0.45
setContentSizeMethod · 0.45

Tested by

no test coverage detected