aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2018-07-11 22:45:22 +0200
committerEugene Sandulenko2018-07-11 22:45:36 +0200
commit000d5fcba8f38b579c8de40511f4f13d79acd0df (patch)
tree61f06c82eff0b0b8379ecde7bd7a4ef11764e004 /engines
parentf2b61dd814878523d9619f3655f68bbfe1ba8a87 (diff)
downloadscummvm-rg350-000d5fcba8f38b579c8de40511f4f13d79acd0df.tar.gz
scummvm-rg350-000d5fcba8f38b579c8de40511f4f13d79acd0df.tar.bz2
scummvm-rg350-000d5fcba8f38b579c8de40511f4f13d79acd0df.zip
PINK: Make menu blocking
Diffstat (limited to 'engines')
-rw-r--r--engines/pink/director.cpp10
-rw-r--r--engines/pink/director.h2
-rw-r--r--engines/pink/pink.cpp4
3 files changed, 15 insertions, 1 deletions
diff --git a/engines/pink/director.cpp b/engines/pink/director.cpp
index 98446c428e..fa333e9b37 100644
--- a/engines/pink/director.cpp
+++ b/engines/pink/director.cpp
@@ -88,6 +88,12 @@ Director::Director()
}
void Director::update() {
+ if (isMenuActive()) {
+ _wm.draw();
+ draw();
+ return;
+ }
+
for (uint i = 0; i < _sounds.size(); ++i) {
_sounds[i]->update();
}
@@ -106,6 +112,10 @@ bool Director::processEvent(Common::Event &event) {
return _wm.processEvent(event);
}
+bool Director::isMenuActive() {
+ return _wm.isMenuActive();
+}
+
void Director::addSprite(ActionCEL *sprite) {
_sprites.push_back(sprite);
int i;
diff --git a/engines/pink/director.h b/engines/pink/director.h
index 803d2638b1..8117343293 100644
--- a/engines/pink/director.h
+++ b/engines/pink/director.h
@@ -62,6 +62,8 @@ public:
void pause(bool pause);
+ bool isMenuActive();
+
void saveStage();
void loadStage();
diff --git a/engines/pink/pink.cpp b/engines/pink/pink.cpp
index 1a06d11e3f..f18df012ed 100644
--- a/engines/pink/pink.cpp
+++ b/engines/pink/pink.cpp
@@ -147,7 +147,9 @@ Common::Error Pink::PinkEngine::run() {
}
}
- _actor->update();
+ if (!_director->isMenuActive())
+ _actor->update();
+
_director->update();
_system->delayMillis(10);
}