diff options
author | lolbot-iichan | 2019-06-26 03:09:17 +0300 |
---|---|---|
committer | Filippos Karapetis | 2019-06-30 12:20:36 +0300 |
commit | d6a1248a160d2cd55c274cf9bb106e7273d9f003 (patch) | |
tree | 3f699b1679b9dd121b20524865e9a08f3afbc94a /engines/wintermute/ui | |
parent | cf274fa47e225be7df92857f567c849a7aa30a2a (diff) | |
download | scummvm-rg350-d6a1248a160d2cd55c274cf9bb106e7273d9f003.tar.gz scummvm-rg350-d6a1248a160d2cd55c274cf9bb106e7273d9f003.tar.bz2 scummvm-rg350-d6a1248a160d2cd55c274cf9bb106e7273d9f003.zip |
WINTERMUTE: Increase window title height by 1 for "5 Lethal Demons" game
For some reason getFontHeight() is off-by-one comparing to height set in
TITLE_RECT, which made text being bigger then title rect and drawing was
skipped.
This fixes https://bugs.scummvm.org/ticket/6501
Diffstat (limited to 'engines/wintermute/ui')
-rw-r--r-- | engines/wintermute/ui/ui_window.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp index 34341d1db2..c8496c1518 100644 --- a/engines/wintermute/ui/ui_window.cpp +++ b/engines/wintermute/ui/ui_window.cpp @@ -27,6 +27,7 @@ */ #include "engines/wintermute/base/base_game.h" +#include "engines/wintermute/base/base_engine.h" #include "engines/wintermute/base/base_parser.h" #include "engines/wintermute/base/base_active_rect.h" #include "engines/wintermute/base/base_dynamic_buffer.h" @@ -604,6 +605,13 @@ bool UIWindow::loadBuffer(char *buffer, bool complete) { return STATUS_FAILED; } + // HACK: Increase window title height by 1 for "5 Lethal Demons" game + // For some reason getFontHeight() is off-by-one comparing to height set in TITLE_RECT, + // Which made text being bigger then title rect and drawing was skipped. + if (BaseEngine::instance().getGameId() == "5ld" && !_titleRect.isRectEmpty() && _text) { + _titleRect.bottom ++; + } + correctSize(); if (alpha != 0 && ar == 0 && ag == 0 && ab == 0) { |