aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/wage/gui.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index d8bb220aa8..7afcf2299e 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -151,9 +151,6 @@ Gui::Gui(WageEngine *engine) {
_consoleFullRedraw = true;
_screen.create(g_system->getWidth(), g_system->getHeight(), Graphics::PixelFormat::createFormatCLUT8());
- Patterns p;
- p.push_back(checkersPattern);
-
_scrollPos = 0;
_consoleLineHeight = 8; // Dummy value which makes sense
_consoleNumLines = 24; // Dummy value
@@ -172,11 +169,6 @@ Gui::Gui(WageEngine *engine) {
_cursorIsArrow = true;
CursorMan.showMouse(true);
- // Draw desktop
- Common::Rect r(0, 0, _screen.w - 1, _screen.h - 1);
- Design::drawFilledRoundRect(&_screen, r, kDesktopArc, kColorBlack, p, 1);
- g_system->copyRectToScreen(_screen.getPixels(), _screen.pitch, 0, 0, _screen.w, _screen.h);
-
loadFonts();
g_system->getTimerManager()->installTimerProc(&cursor_timer_handler, 200000, this, "wageCursor");
@@ -254,7 +246,18 @@ void Gui::appendText(String &str) {
void Gui::draw() {
if (_scene != _engine->_world->_player->_currentScene || _sceneDirty) {
_scene = _engine->_world->_player->_currentScene;
+
+ // Draw desktop
+ Patterns p;
+ p.push_back(checkersPattern);
+ Common::Rect r(0, 0, _screen.w - 1, _screen.h - 1);
+ Design::drawFilledRoundRect(&_screen, r, kDesktopArc, kColorBlack, p, 1);
+ g_system->copyRectToScreen(_screen.getPixels(), _screen.pitch, 0, 0, _screen.w, _screen.h);
+
_sceneDirty = true;
+ _consoleDirty = true;
+ _menuDirty = true;
+ _consoleFullRedraw = true;
_scene->paint(&_screen, 0 + kComponentsPadding, kMenuHeight + kComponentsPadding);
@@ -279,10 +282,10 @@ void Gui::draw() {
paintBorder(&_screen, _sceneArea, kWindowScene);
// Render console
- if (_consoleDirty)
+ if (_consoleDirty || _consoleFullRedraw)
renderConsole(&_screen, _consoleTextArea);
- if (_bordersDirty || _consoleDirty)
+ if (_bordersDirty || _consoleDirty || _consoleFullRedraw)
paintBorder(&_screen, _consoleTextArea, kWindowConsole);
if (_menuDirty)