* Takes care of any events from the core game engine, * and passes them on to its InteractiveSurface child elements. * @param action Pointer to an action. */
| 144 | * @param action Pointer to an action. |
| 145 | */ |
| 146 | void State::handle(Action *action) |
| 147 | { |
| 148 | if (!_modal) |
| 149 | { |
| 150 | for (std::vector<Surface*>::reverse_iterator i = _surfaces.rbegin(); i != _surfaces.rend(); ++i) |
| 151 | { |
| 152 | InteractiveSurface* j = dynamic_cast<InteractiveSurface*>(*i); |
| 153 | if (j != 0) |
| 154 | j->handle(action, this); |
| 155 | } |
| 156 | } |
| 157 | else |
| 158 | { |
| 159 | _modal->handle(action, this); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | /** |
| 164 | * Blits all the visible Surface child elements onto the |