| 210 | } |
| 211 | |
| 212 | void GameToolbox::alignItemsVerticallyWithPadding(ax::Vector<ax::Node*> _children, float padding) { |
| 213 | float height = -padding; |
| 214 | |
| 215 | for (const auto& child : _children) |
| 216 | height += child->getContentSize().height * child->getScaleY() + padding; |
| 217 | |
| 218 | float y = height / 2.0f; |
| 219 | |
| 220 | for (const auto& child : _children) { |
| 221 | child->setPosition(0, y - child->getContentSize().height * child->getScaleY() / 2.0f); |
| 222 | y -= child->getContentSize().height * child->getScaleY() + padding; |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | int GameToolbox::getHighestChildZ(ax::Node* node) |
| 227 | { |
nothing calls this directly
no test coverage detected