this should probably return a box to allow for when controls don't start at 0,0
| 88 | |
| 89 | //this should probably return a box to allow for when controls don't start at 0,0 |
| 90 | Eigen::Vector2f ScrollableContainer::getContentSize() |
| 91 | { |
| 92 | Eigen::Vector2f max(0, 0); |
| 93 | for(unsigned int i = 0; i < mChildren.size(); i++) |
| 94 | { |
| 95 | Eigen::Vector2f pos(mChildren.at(i)->getPosition()[0], mChildren.at(i)->getPosition()[1]); |
| 96 | Eigen::Vector2f bottomRight = mChildren.at(i)->getSize() + pos; |
| 97 | if(bottomRight.x() > max.x()) |
| 98 | max.x() = bottomRight.x(); |
| 99 | if(bottomRight.y() > max.y()) |
| 100 | max.y() = bottomRight.y(); |
| 101 | } |
| 102 | |
| 103 | return max; |
| 104 | } |
| 105 | |
| 106 | void ScrollableContainer::resetAutoScrollTimer() |
| 107 | { |
nothing calls this directly
no test coverage detected