aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wage/gui.cpp')
-rw-r--r--engines/wage/gui.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 713a1c2b5b..0bf176a5f2 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -63,7 +63,8 @@ enum {
kMenuHeight = 19,
kMenuPadding = 6,
kMenuItemHeight = 19,
- kBorderWidth = 17
+ kBorderWidth = 17,
+ kDesktopArc = 7
};
static const byte palette[] = {
@@ -73,7 +74,8 @@ static const byte palette[] = {
0x00, 0xff, 0x00 // Green
};
-static byte checkers[8] = { 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa };
+static byte checkersPattern[8] = { 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa };
+static byte fillPattern[8] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
static const byte macCursorArrow[] = {
2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
@@ -119,7 +121,7 @@ Gui::Gui() {
_screen.create(g_system->getWidth(), g_system->getHeight(), Graphics::PixelFormat::createFormatCLUT8());
Patterns p;
- p.push_back(checkers);
+ p.push_back(checkersPattern);
_scrollPos = 0;
_builtInFonts = false;
@@ -131,8 +133,9 @@ Gui::Gui() {
_cursorIsArrow = true;
CursorMan.showMouse(true);
+ // Draw desktop
Common::Rect r(0, 0, _screen.w - 1, _screen.h - 1);
- Design::drawFilledRoundRect(&_screen, r, 7, kColorBlack, p, 1);
+ Design::drawFilledRoundRect(&_screen, r, kDesktopArc, kColorBlack, p, 1);
loadFonts();
}
@@ -188,6 +191,8 @@ void Gui::draw() {
paintBorder(&_screen, sceneW, kMenuHeight, _screen.w - sceneW, _scene->_design->getBounds()->height(),
kWindowConsole);
+ renderMenu();
+
// Blit to screen
g_system->copyRectToScreen(_screen.getPixels(), _screen.pitch, 0, 0, _screen.w, _screen.h);
}
@@ -451,4 +456,16 @@ void Gui::mouseMove(int x, int y) {
}
}
+void Gui::renderMenu() {
+ Common::Rect r(0, 0, _screen.w - 1, kMenuHeight - 1);
+ Patterns p;
+ p.push_back(fillPattern);
+
+ Design::drawFilledRoundRect(&_screen, r, kDesktopArc, kColorWhite, p, 1);
+ r.top = 7;
+ Design::drawFilledRect(&_screen, r, kColorWhite, p, 1);
+ r.top = kMenuHeight - 1;
+ Design::drawFilledRect(&_screen, r, kColorBlack, p, 1);
+}
+
} // End of namespace Wage