+ handleEvent(event);
+ }
+ }
+
+
+ void update(Scalar t, Scalar dt)
+ {
+ for (stackIt = stack.begin(); stackIt != stack.end(); ++stackIt)
+ {
+ (*stackIt)->update(t, dt);
+ }
+ }
+
+ void draw(Scalar alpha)
+ {
+ // FIXME - this will crash if the layer being drawn pops itself
+ std::list<LayerP>::reverse_iterator it;
+ for (it = stack.rbegin(); it != stack.rend(); ++it)
+ {
+ (*it)->draw(alpha);
+ }
+ }
+
+ void handleEvent(const Event& event)
+ {
+ for (stackIt = stack.begin(); stackIt != stack.end(); ++stackIt)
+ {
+ if ((*stackIt)->handleEvent(event)) break;