|
@@ -84,35 +84,6 @@ namespace oxygine
|
|
|
|
|
|
|
|
void Flow::show(spScene scene, const resultCallback& cb)
|
|
void Flow::show(spScene scene, const resultCallback& cb)
|
|
|
{
|
|
{
|
|
|
- if (scenes.empty())
|
|
|
|
|
- {
|
|
|
|
|
- scenes.push_back(scene);
|
|
|
|
|
- scene->preEntering();
|
|
|
|
|
- scene->preShowing();
|
|
|
|
|
- scene->_resultCB = cb;
|
|
|
|
|
-
|
|
|
|
|
- _wasBackBlocked = false;
|
|
|
|
|
- _wasTouchBlocked = false;
|
|
|
|
|
-
|
|
|
|
|
- if (_secondary)
|
|
|
|
|
- {
|
|
|
|
|
- spScene current = new Scene;
|
|
|
|
|
- current->_holder->setPriority(1000);
|
|
|
|
|
- current->_holder->attachTo(getStage());
|
|
|
|
|
-
|
|
|
|
|
- phaseBegin(current, scene, false);
|
|
|
|
|
- current->_holder->detach();
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- scene->_holder->attachTo(getStage());
|
|
|
|
|
- scene->postShowing();
|
|
|
|
|
- scene->postEntering();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
auto p = std::find(scenes.begin(), scenes.end(), scene);
|
|
auto p = std::find(scenes.begin(), scenes.end(), scene);
|
|
|
if (p != scenes.end())
|
|
if (p != scenes.end())
|
|
|
{
|
|
{
|
|
@@ -318,6 +289,9 @@ namespace oxygine
|
|
|
|
|
|
|
|
void Flow::checkDone()
|
|
void Flow::checkDone()
|
|
|
{
|
|
{
|
|
|
|
|
+ if (scenes.empty())
|
|
|
|
|
+ return;
|
|
|
|
|
+
|
|
|
spScene current = scenes.back();
|
|
spScene current = scenes.back();
|
|
|
if (current->_done)
|
|
if (current->_done)
|
|
|
{
|
|
{
|
|
@@ -352,11 +326,44 @@ namespace oxygine
|
|
|
if (scenes2show.empty())
|
|
if (scenes2show.empty())
|
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
- if (scenes.back()->_done)
|
|
|
|
|
|
|
+ if (_transition)
|
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
- if (_transition)
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (scenes.empty())
|
|
|
|
|
+ {
|
|
|
|
|
+ spScene scene = scenes2show.front();
|
|
|
|
|
+ scenes2show.erase(scenes2show.begin());
|
|
|
|
|
+
|
|
|
|
|
+ scenes.push_back(scene);
|
|
|
|
|
+ scene->preEntering();
|
|
|
|
|
+ scene->preShowing();
|
|
|
|
|
+
|
|
|
|
|
+ _wasBackBlocked = false;
|
|
|
|
|
+ _wasTouchBlocked = false;
|
|
|
|
|
+
|
|
|
|
|
+ if (_secondary)
|
|
|
|
|
+ {
|
|
|
|
|
+ spScene current = new Scene;
|
|
|
|
|
+ current->_holder->setPriority(1000);
|
|
|
|
|
+ current->_holder->attachTo(getStage());
|
|
|
|
|
+
|
|
|
|
|
+ phaseBegin(current, scene, false);
|
|
|
|
|
+ current->_holder->detach();
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ scene->_holder->attachTo(getStage());
|
|
|
|
|
+ scene->postShowing();
|
|
|
|
|
+ scene->postEntering();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return;
|
|
return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (scenes.back()->_done)
|
|
|
|
|
+ return;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
spScene current = scenes.back();
|
|
spScene current = scenes.back();
|
|
|
|
|
|