From 37d35a9d8a98c730b6b3579a479fc7d0562f6a02 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 16 Sep 2012 20:18:27 +0200 Subject: fixed message boxes not drawing --- src/msgbox.cpp | 5 ++++- src/msgbox.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3