From 93ce6f7292c430a444fe421953641c511e4590cf Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Sat, 16 Jan 2010 09:16:56 +0000 Subject: [PATCH] Remove text when no message is active --- status_bar.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/status_bar.cpp b/status_bar.cpp index 38b5bb1..db066cc 100644 --- a/status_bar.cpp +++ b/status_bar.cpp @@ -39,11 +39,16 @@ void StatusBar::timeoutCallback() static const char *text[2]; this->cur_message = this->dequeueMessage(); - if (this->cur_message) - Gui::gui->timerController->arm(this, 500); text[0] = this->cur_message; text[1] = NULL; - this->setText(text); + + if (this->cur_message) + { + Gui::gui->timerController->arm(this, 500); + this->setText(text); + } + else + this->setText(NULL); } void StatusBar::draw(SDL_Surface *where)