diff options
author | Borja Lorente | 2016-06-13 00:36:24 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-14 18:24:56 +0200 |
commit | 9564866ec360dbab39973a5b982b748f6c060637 (patch) | |
tree | 5967a0ecf62b278c620d5ea7530d426f33fff069 /engines/macventure | |
parent | 88e6f9257e14b08ea15f24b60823aaa969502ad3 (diff) | |
download | scummvm-rg350-9564866ec360dbab39973a5b982b748f6c060637.tar.gz scummvm-rg350-9564866ec360dbab39973a5b982b748f6c060637.tar.bz2 scummvm-rg350-9564866ec360dbab39973a5b982b748f6c060637.zip |
MACVENTURE: Add image to self window
Diffstat (limited to 'engines/macventure')
-rw-r--r-- | engines/macventure/gui.cpp | 39 | ||||
-rw-r--r-- | engines/macventure/gui.h | 3 |
2 files changed, 39 insertions, 3 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 849dca50e6..3aa9c5de33 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -89,8 +89,7 @@ Gui::~Gui() { } void Gui::draw() { - - drawCommandsWindow(); + drawWindows(); _wm.draw(); } @@ -170,7 +169,8 @@ void Gui::initWindows() { _selfWindow->setDimensions(getWindowData(kSelfWindow).bounds); _selfWindow->setActive(false); _selfWindow->setCallback(selfWindowCallback, this); - loadBorder(_selfWindow, "border_command.bmp", false); + loadBorder(_selfWindow, "border_self_inac.bmp", false); + loadBorder(_selfWindow, "border_self_act.bmp", true); // Exits Window _exitsWindow = _wm.addWindow(false, true, true); @@ -402,6 +402,14 @@ bool Gui::loadControls() { return true; } +void Gui::drawWindows() { + + drawCommandsWindow(); + drawMainGameWindow(); + + drawSelfWindow(); +} + void Gui::drawCommandsWindow() { if (_engine->isPaused()) { Graphics::ManagedSurface *srf = _controlsWindow->getSurface(); @@ -427,6 +435,30 @@ void Gui::drawCommandsWindow() { } } +void Gui::drawMainGameWindow() { + Graphics::ManagedSurface *srf = _mainGameWindow->getSurface(); + BorderBounds border = borderBounds(getWindowData(kMainGameWindow).type); + srf->fillRect( + Common::Rect( + border.leftOffset * 2, + border.topOffset * 2, + srf->w - (border.rightOffset * 3), + srf->h - (border.bottomOffset * 3)), + kColorWhite); + getCurrentFont().drawString( + srf, + Common::String("Main Game Window"), + 0, + (srf->h / 2) - getCurrentFont().getFontHeight(), + srf->w, + kColorBlack, + Graphics::kTextAlignCenter); +} + +void Gui::drawSelfWindow() { + +} + /* CALLBACKS */ @@ -585,6 +617,7 @@ BorderBounds Gui::borderBounds(MVWindowType type) { case MacVenture::kPlainDBox: return BorderBounds(6, 6, 6, 6); case MacVenture::kAltBox: + //return BorderBounds(8, 9, 11, 10); // For now, I'll stick to the original bmp, it's gorgeous break; case MacVenture::kNoGrowDoc: return BorderBounds(1, 17, 1, 1); diff --git a/engines/macventure/gui.h b/engines/macventure/gui.h index a8dc7a755e..1eba4d231b 100644 --- a/engines/macventure/gui.h +++ b/engines/macventure/gui.h @@ -183,7 +183,10 @@ private: // Methods void loadBorder(Graphics::MacWindow * target, Common::String filename, bool active); // Drawers + void drawWindows(); void drawCommandsWindow(); + void drawMainGameWindow(); + void drawSelfWindow(); }; |