diff --git a/gui/GuiManager.cpp b/gui/GuiManager.cpp
index 931c307..3d02816 100644
a
|
b
|
GuiManager::GuiManager() : _redrawStatus(kRedrawDisabled),
|
54 | 54 | |
55 | 55 | _system = g_system; |
56 | 56 | _lastScreenChangeID = _system->getScreenChangeID(); |
| 57 | _width = _system->getOverlayWidth(); |
| 58 | _height = _system->getOverlayHeight(); |
57 | 59 | |
58 | 60 | // Clear the cursor |
59 | 61 | memset(_cursor, 0xFF, sizeof(_cursor)); |
… |
… |
bool GuiManager::checkScreenChange() {
|
448 | 450 | |
449 | 451 | void GuiManager::screenChange() { |
450 | 452 | _lastScreenChangeID = _system->getScreenChangeID(); |
| 453 | _width = _system->getOverlayWidth(); |
| 454 | _height = _system->getOverlayHeight(); |
451 | 455 | |
452 | 456 | // reinit the whole theme |
453 | 457 | _theme->refresh(); |
diff --git a/gui/GuiManager.h b/gui/GuiManager.h
index a5e7548..892d1aa 100644
a
|
b
|
public:
|
76 | 76 | |
77 | 77 | ThemeEval *xmlEval() { return _theme->getEvaluator(); } |
78 | 78 | |
| 79 | int getWidth() const { return _width; } |
| 80 | int getHeight() const { return _height; } |
| 81 | |
79 | 82 | const Graphics::Font &getFont(ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return *(_theme->getFont(style)); } |
80 | 83 | int getFontHeight(ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return _theme->getFontHeight(style); } |
81 | 84 | int getStringWidth(const Common::String &str, ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return _theme->getStringWidth(str, style); } |
… |
… |
protected:
|
104 | 107 | // bool _needRedraw; |
105 | 108 | RedrawStatus _redrawStatus; |
106 | 109 | int _lastScreenChangeID; |
| 110 | int _width, _height; |
107 | 111 | DialogStack _dialogStack; |
108 | 112 | |
109 | 113 | bool _stateIsSaved; |
diff --git a/gui/object.cpp b/gui/object.cpp
index f24ce09..aaa5a1a 100644
a
|
b
|
void GuiObject::reflowLayout() {
|
48 | 48 | |
49 | 49 | if (_x < 0) |
50 | 50 | error("Widget <%s> has x < 0 (%d)", _name.c_str(), _x); |
51 | | if (_x >= g_system->getOverlayWidth()) |
52 | | error("Widget <%s> has x > %d (%d)", _name.c_str(), g_system->getOverlayWidth(), _x); |
53 | | if (_x + _w > g_system->getOverlayWidth()) |
54 | | error("Widget <%s> has x + w > %d (%d)", _name.c_str(), g_system->getOverlayWidth(), _x + _w); |
| 51 | if (_x >= g_gui.getWidth()) |
| 52 | error("Widget <%s> has x > %d (%d)", _name.c_str(), g_gui.getWidth(), _x); |
| 53 | if (_x + _w > g_gui.getWidth()) |
| 54 | error("Widget <%s> has x + w > %d (%d)", _name.c_str(), g_gui.getWidth(), _x + _w); |
55 | 55 | if (_y < 0) |
56 | 56 | error("Widget <%s> has y < 0 (%d)", _name.c_str(), _y); |
57 | | if (_y >= g_system->getOverlayHeight()) |
58 | | error("Widget <%s> has y > %d (%d)", _name.c_str(), g_system->getOverlayHeight(), _y); |
59 | | if (_y + _h > g_system->getOverlayHeight()) |
60 | | error("Widget <%s> has y + h > %d (%d)", _name.c_str(), g_system->getOverlayHeight(), _y + _h); |
| 57 | if (_y >= g_gui.getHeight()) |
| 58 | error("Widget <%s> has y > %d (%d)", _name.c_str(), g_gui.getHeight(), _y); |
| 59 | if (_y + _h > g_gui.getHeight()) |
| 60 | error("Widget <%s> has y + h > %d (%d)", _name.c_str(), g_gui.getHeight(), _y + _h); |
61 | 61 | } |
62 | 62 | } |
63 | 63 | |