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

Method minContainerOffset

extensions/GUI/src/GUI/ScrollView/ScrollView.cpp:420–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420Vec2 ScrollView::minContainerOffset()
421{
422 Point anchorPoint = _container->isIgnoreAnchorPointForPosition() ? Point::ZERO : _container->getAnchorPoint();
423 float contW = _container->getContentSize().width * _container->getScaleX();
424 float contH = _container->getContentSize().height * _container->getScaleY();
425
426 return Vec2(_viewSize.width - (1 - anchorPoint.x) * contW, _viewSize.height - (1 - anchorPoint.y) * contH);
427}
428
429void ScrollView::deaccelerateScrolling(float /*dt*/)
430{

Callers 7

setContentOffsetMethod · 0.95
relocateContainerMethod · 0.95
deaccelerateScrollingMethod · 0.95
updateInsetMethod · 0.95
onMouseScrollMethod · 0.80
_updateContentSizeMethod · 0.80

Calls 6

getAnchorPointMethod · 0.80
Vec2Function · 0.50
getContentSizeMethod · 0.45
getScaleXMethod · 0.45
getScaleYMethod · 0.45

Tested by 1

onMouseScrollMethod · 0.64