* Re-orients all the surfaces in the state. * @param dX delta of X; * @param dY delta of Y; */
| 406 | * @param dY delta of Y; |
| 407 | */ |
| 408 | void State::recenter(int dX, int dY) |
| 409 | { |
| 410 | for (std::vector<Surface*>::const_iterator i = _surfaces.begin(); i != _surfaces.end(); ++i) |
| 411 | { |
| 412 | (*i)->setX((*i)->getX() + dX / 2); |
| 413 | (*i)->setY((*i)->getY() + dY / 2); |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | } |