dmuratshin 9 years ago
parent
commit
b6d624f942
3 changed files with 8 additions and 6 deletions
  1. 2 0
      src/flow/Scene.h
  2. 4 4
      src/flow/flow.cpp
  3. 2 2
      src/flow/flow.h

+ 2 - 0
src/flow/Scene.h

@@ -115,6 +115,7 @@ namespace oxygine
             const FlowEvent& getFinishEvent() const { return _finishEvent; }
             bool            isDialog() const { return _dialog; }
             bool            isInStackWide() const { return _instackWide; }
+            bool            isVisibleWide() const { return _visibleWide; }
 
         protected:
 
@@ -151,6 +152,7 @@ namespace oxygine
             bool _done;
 
 
+       public:
             void preShowing();
             void postShowing();
             void preHiding();

+ 4 - 4
src/flow/flow.cpp

@@ -224,7 +224,7 @@ namespace oxygine
             {
                 current->postLeaving();
                 OX_ASSERT(next->_dialog == false);
-                std::vector<spScene>::iterator i = std::find(scenes.begin(), scenes.end(), current);
+                std::list<spScene>::iterator i = std::find(scenes.begin(), scenes.end(), current);
                 OX_ASSERT(i != scenes.end());
                 scenes.erase(i);
 
@@ -285,7 +285,7 @@ namespace oxygine
             spScene current = scenes.back();
 
 
-            std::vector<spScene>::iterator it = scenes2show.begin();
+            std::list<spScene>::iterator it = scenes2show.begin();
 
             if (!current->_allowDialogsOnTop)
             {
@@ -326,9 +326,9 @@ namespace oxygine
             if (DebugActor::instance)
             {
                 std::string str;
-                for (size_t i = 0; i < scenes.size(); ++i)
+                for (auto it = scenes.begin(); it != scenes.end(); ++it)
                 {
-                    str += scenes[i]->getName();
+                    str += (*it)->getName();
                     str += "-> ";
                 }
                 if (!str.empty())

+ 2 - 2
src/flow/flow.h

@@ -57,8 +57,8 @@ namespace oxygine
             bool hasSceneInStack(spScene) const;
             void removeFromStack(spScene);
 
-            std::vector<spScene> scenes;
-            std::vector<spScene> scenes2show;
+            std::list<spScene> scenes;
+            std::list<spScene> scenes2show;
 
             bool _transition;
             bool _back;