MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / updateDuration

Method updateDuration

Engine/source/Verve/GUI/VTimeLineControl.cpp:458–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456}
457
458void VTimeLineControl::updateDuration( void )
459{
460 if ( !mController )
461 {
462 // No Controller.
463 return;
464 }
465
466 // Add 500ms.
467 const S32 length = toPoint( mController->getDuration() + 500 );
468
469 // Set Min Extent.
470 setMinExtent( Point2I( length, getHeight() ) );
471
472 if ( getWidth() < length )
473 {
474 // Conform to Min Extent.
475 setExtent( length, getHeight() );
476 }
477}

Callers 1

Calls 6

setMinExtentFunction · 0.85
getWidthFunction · 0.85
setExtentFunction · 0.85
Point2IClass · 0.50
getHeightFunction · 0.50
getDurationMethod · 0.45

Tested by

no test coverage detected