| 8 | } |
| 9 | |
| 10 | void ScrollableContainer::render(const Eigen::Affine3f& parentTrans) |
| 11 | { |
| 12 | Eigen::Affine3f trans = parentTrans * getTransform(); |
| 13 | |
| 14 | Eigen::Vector2i clipPos((int)trans.translation().x(), (int)trans.translation().y()); |
| 15 | |
| 16 | Eigen::Vector3f dimScaled = trans * Eigen::Vector3f(mSize.x(), mSize.y(), 0); |
| 17 | Eigen::Vector2i clipDim((int)dimScaled.x() - trans.translation().x(), (int)dimScaled.y() - trans.translation().y()); |
| 18 | |
| 19 | Renderer::pushClipRect(clipPos, clipDim); |
| 20 | |
| 21 | trans.translate(Eigen::Vector3f((float)-mScrollPos.x(), (float)-mScrollPos.y(), 0)); |
| 22 | Renderer::setMatrix(trans); |
| 23 | |
| 24 | GuiComponent::renderChildren(trans); |
| 25 | |
| 26 | Renderer::popClipRect(); |
| 27 | } |
| 28 | |
| 29 | void ScrollableContainer::setAutoScroll(int delay, double speed) |
| 30 | { |
nothing calls this directly
no test coverage detected