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

Method updateDuration

Engine/modules/Verve/GUI/VTimeLineControl.cpp:457–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

ConsoleMethodFunction · 0.45

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