summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-16 20:18:27 +0200
committerTreeki <treeki@gmail.com>2012-09-16 20:18:27 +0200
commit37d35a9d8a98c730b6b3579a479fc7d0562f6a02 (patch)
tree262be93531efb277bb5d3f48c67fce9ff04d55e5
parent1fb4f994012db80d8cda7b6f37a003118526f0e2 (diff)
downloadkamek-37d35a9d8a98c730b6b3579a479fc7d0562f6a02.tar.gz
kamek-37d35a9d8a98c730b6b3579a479fc7d0562f6a02.zip
fixed message boxes not drawing
-rw-r--r--src/msgbox.cpp5
-rw-r--r--src/msgbox.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/msgbox.cpp b/src/msgbox.cpp
index 9a5fb25..968b607 100644
--- a/src/msgbox.cpp
+++ b/src/msgbox.cpp
@@ -279,7 +279,10 @@ daEnMsgBlock_c *daEnMsgBlock_c::build() {
void daEnMsgBlock_c::blockWasHit(bool isDown) {
pos.y = initialY;
- dMsgBoxManager_c::instance->showMessage(settings);
+ if (dMsgBoxManager_c::instance)
+ dMsgBoxManager_c::instance->showMessage(settings);
+ else
+ Delete(false);
physics.setup(this, &physicsInfo, 3, currentLayerID);
physics.addToList();
diff --git a/src/msgbox.h b/src/msgbox.h
index 032b5c8..f71749d 100644
--- a/src/msgbox.h
+++ b/src/msgbox.h
@@ -16,6 +16,8 @@ class dMsgBoxManager_c : public dStageActor_c {
int beforeExecute() { return true; }
int afterExecute(int) { return true; }
+ int beforeDraw() { return true; }
+ int afterDraw(int) { return true; }
m2d::EmbedLayout_c layout;
dDvdLoader_c msgDataLoader;