diff options
author | Tobia Tesan | 2013-09-20 13:42:53 +0200 |
---|---|---|
committer | Tobia Tesan | 2013-09-21 23:22:16 +0200 |
commit | 2e457d96e8095020bce006fd633382bde6c6ae26 (patch) | |
tree | 6a0355bd732100682b25caeb6cbe493edba1a848 /engines/wintermute/ui/ui_window.cpp | |
parent | b033850e8a07595dee479a37d50e87a828be356c (diff) | |
download | scummvm-rg350-2e457d96e8095020bce006fd633382bde6c6ae26.tar.gz scummvm-rg350-2e457d96e8095020bce006fd633382bde6c6ae26.tar.bz2 scummvm-rg350-2e457d96e8095020bce006fd633382bde6c6ae26.zip |
WINTERMUTE: Make some members of UIObject private
Diffstat (limited to 'engines/wintermute/ui/ui_window.cpp')
-rw-r--r-- | engines/wintermute/ui/ui_window.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp index e8acd11a2c..c098415367 100644 --- a/engines/wintermute/ui/ui_window.cpp +++ b/engines/wintermute/ui/ui_window.cpp @@ -141,8 +141,8 @@ bool UIWindow::display(int offsetX, int offsetY) { } if (_shieldButton) { _shieldButton->_posX = _shieldButton->_posY = 0; - _shieldButton->_width = _gameRef->_renderer->getWidth(); - _shieldButton->_height = _gameRef->_renderer->getHeight(); + _shieldButton->setWidth(_gameRef->_renderer->getWidth()); + _shieldButton->setHeight(_gameRef->_renderer->getHeight()); _shieldButton->display(); } @@ -170,7 +170,7 @@ bool UIWindow::display(int offsetX, int offsetY) { _dragFrom.y = _gameRef->_mousePos.y; } - if (!_focusedWidget || (!_focusedWidget->_canFocus || _focusedWidget->_disable || !_focusedWidget->_visible)) { + if (!_focusedWidget || (!_focusedWidget->canFocus() || _focusedWidget->isDisabled() || !_focusedWidget->isVisible())) { moveFocus(); } @@ -737,7 +737,7 @@ bool UIWindow::saveAsText(BaseDynamicBuffer *buffer, int indent) { bool UIWindow::enableWidget(const char *name, bool enable) { for (uint32 i = 0; i < _widgets.size(); i++) { if (scumm_stricmp(_widgets[i]->getName(), name) == 0) { - _widgets[i]->_disable = !enable; + _widgets[i]->setDisabled(!enable); } } return STATUS_OK; @@ -748,7 +748,7 @@ bool UIWindow::enableWidget(const char *name, bool enable) { bool UIWindow::showWidget(const char *name, bool visible) { for (uint32 i = 0; i < _widgets.size(); i++) { if (scumm_stricmp(_widgets[i]->getName(), name) == 0) { - _widgets[i]->_visible = visible; + _widgets[i]->setVisible(visible); } } return STATUS_OK; @@ -1309,7 +1309,7 @@ bool UIWindow::moveFocus(bool forward) { bool done = false; while (numTries <= (int32)_widgets.size()) { - if (_widgets[i] != _focusedWidget && _widgets[i]->_canFocus && _widgets[i]->_visible && !_widgets[i]->_disable) { + if (_widgets[i] != _focusedWidget && _widgets[i]->canFocus() && _widgets[i]->isVisible() && !_widgets[i]->isDisabled()) { _focusedWidget = _widgets[i]; done = true; break; @@ -1419,7 +1419,7 @@ void UIWindow::makeFreezable(bool freezable) { bool UIWindow::getWindowObjects(BaseArray<UIObject *> &objects, bool interactiveOnly) { for (uint32 i = 0; i < _widgets.size(); i++) { UIObject *control = _widgets[i]; - if (control->_disable && interactiveOnly) { + if (control->isDisabled() && interactiveOnly) { continue; } |