diff options
author | Eugene Sandulenko | 2016-01-18 21:34:18 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:12:47 +0100 |
commit | 61dec8fd964fa710107c3e6f1abb7ee72ec90a6b (patch) | |
tree | 3aaa30a2570232a46da738947c5e0a7e9387ee32 | |
parent | 76639b5d3a8cf4b869a7b81cffe6ae1f8c6c0557 (diff) | |
download | scummvm-rg350-61dec8fd964fa710107c3e6f1abb7ee72ec90a6b.tar.gz scummvm-rg350-61dec8fd964fa710107c3e6f1abb7ee72ec90a6b.tar.bz2 scummvm-rg350-61dec8fd964fa710107c3e6f1abb7ee72ec90a6b.zip |
WAGE: Fix scene and text position as it is provided by the game data
-rw-r--r-- | engines/wage/gui.cpp | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 268e2dce8c..b5edafd1fc 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -255,23 +255,17 @@ void Gui::draw() { _menuDirty = true; _consoleFullRedraw = true; - _scene->paint(&_screen, 0 + kComponentsPadding, kMenuHeight + kComponentsPadding); - - _sceneArea.left = 0 + kComponentsPadding + kBorderWidth; - _sceneArea.top = kMenuHeight + kComponentsPadding + kBorderWidth; - _sceneArea.setWidth(_scene->_design->getBounds()->width() - 2 * kBorderWidth); - _sceneArea.setHeight(_scene->_design->getBounds()->height() - 2 * kBorderWidth); - - int sceneW = _scene->_design->getBounds()->width(); - int consoleW = _screen.w - sceneW - 2 * kComponentsPadding - 2 * kBorderWidth; - int consoleH = _scene->_design->getBounds()->height() - 2 * kBorderWidth; - int consoleX = sceneW + kComponentsPadding + kBorderWidth; - int consoleY = kMenuHeight + kComponentsPadding + kBorderWidth; - - _consoleTextArea.left = consoleX; - _consoleTextArea.top = consoleY; - _consoleTextArea.right = consoleX + consoleW; - _consoleTextArea.bottom = consoleY + consoleH; + _scene->paint(&_screen, _scene->_designBounds->left, _scene->_designBounds->top); + + _sceneArea.left = _scene->_designBounds->left + kBorderWidth; + _sceneArea.top = _scene->_designBounds->top + kBorderWidth; + _sceneArea.setWidth(_scene->_designBounds->width() - 2 * kBorderWidth); + _sceneArea.setHeight(_scene->_designBounds->height() - 2 * kBorderWidth); + + _consoleTextArea.left = _scene->_textBounds->left + kBorderWidth; + _consoleTextArea.top = _scene->_textBounds->top + kBorderWidth; + _consoleTextArea.setWidth(_scene->_textBounds->width() - 2 * kBorderWidth); + _consoleTextArea.setHeight(_scene->_textBounds->height() - 2 * kBorderWidth); } if (_scene && (_bordersDirty || _sceneDirty)) |