diff options
author | Eugene Sandulenko | 2016-01-01 02:23:43 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-01-01 02:23:43 +0100 |
commit | 1332958c9a951e74f1d3d93b4827c63ba052ad8f (patch) | |
tree | f73e752f70efeb1c7be0cdfeca6515c9e5c8471b | |
parent | 03e3f80bffcb24c2524b62b6602aad8698315b42 (diff) | |
download | scummvm-rg350-1332958c9a951e74f1d3d93b4827c63ba052ad8f.tar.gz scummvm-rg350-1332958c9a951e74f1d3d93b4827c63ba052ad8f.tar.bz2 scummvm-rg350-1332958c9a951e74f1d3d93b4827c63ba052ad8f.zip |
WAGE: Stub for menu drawing
-rw-r--r-- | engines/wage/gui.cpp | 25 | ||||
-rw-r--r-- | engines/wage/gui.h | 1 |
2 files changed, 22 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 diff --git a/engines/wage/gui.h b/engines/wage/gui.h index 216a63c6ae..9573f57e25 100644 --- a/engines/wage/gui.h +++ b/engines/wage/gui.h @@ -75,6 +75,7 @@ private: void drawBox(Graphics::Surface *g, int x, int y, int w, int h); void fillRect(Graphics::Surface *g, int x, int y, int w, int h); void loadFonts(); + void renderMenu(); private: Graphics::Surface _screen; |