diff options
author | Paul Gilbert | 2011-06-04 17:22:09 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-06-04 17:22:09 +1000 |
commit | 6e4e4e50a5c36518e0dc55585ad19101e88f8d05 (patch) | |
tree | 4c8f505f28794af804c3e56cfa51ccfa7b61df6f /engines/tsage | |
parent | 06166e03b09a6c6becb216928fe52d5198d0da9e (diff) | |
download | scummvm-rg350-6e4e4e50a5c36518e0dc55585ad19101e88f8d05.tar.gz scummvm-rg350-6e4e4e50a5c36518e0dc55585ad19101e88f8d05.tar.bz2 scummvm-rg350-6e4e4e50a5c36518e0dc55585ad19101e88f8d05.zip |
TSAGE: Fix one pixel difference in dialog positioning
For some unknown reason, the CD version introduced a one pixel Y difference for dialogs.
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/dialogs.cpp | 8 | ||||
-rw-r--r-- | engines/tsage/graphics.cpp | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp index 1d129a8a3e..de241198e6 100644 --- a/engines/tsage/dialogs.cpp +++ b/engines/tsage/dialogs.cpp @@ -43,20 +43,20 @@ MessageDialog::MessageDialog(const Common::String &message, const Common::String const Common::String &btn2Message) : GfxDialog() { // Set up the message addElements(&_msg, &_btn1, NULL); - + _msg.set(message, 200, ALIGN_LEFT); - _btn1._bounds.moveTo(_msg._bounds.left, _msg._bounds.bottom + 2); + _msg._bounds.moveTo(0, 0); _defaultButton = &_btn1; // Set up the first button _btn1.setText(btn1Message); - _btn1._bounds.moveTo(_msg._bounds.right - _btn1._bounds.width(), _msg._bounds.bottom); + _btn1._bounds.moveTo(_msg._bounds.right - _btn1._bounds.width(), _msg._bounds.bottom + 2); if (!btn2Message.empty()) { // Set up the second button add(&_btn2); _btn2.setText(btn2Message); - _btn2._bounds.moveTo(_msg._bounds.right - _btn2._bounds.width(), _msg._bounds.bottom); + _btn2._bounds.moveTo(_msg._bounds.right - _btn2._bounds.width(), _msg._bounds.bottom + 2); _btn1._bounds.translate(-(_btn2._bounds.width() + 4), 0); } diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index 85ff6d67f5..4e3c03814a 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -809,8 +809,10 @@ void GfxButton::setDefaults() { gfxManager._font.getStringBounds(_message.c_str(), tempRect, 240); tempRect.right = ((tempRect.right + 15) / 16) * 16; - // Set the button bounds to a reduced area + // Set the button bounds tempRect.collapse(-_globals->_gfxEdgeAdjust, -_globals->_gfxEdgeAdjust); + if (_vm->getFeatures() & GF_CD) + --tempRect.top; tempRect.moveTo(_bounds.left, _bounds.top); _bounds = tempRect; } |